Does Jekyll automatically reformat JSON data files?

I’m storing JSON data from my Pocket API into my Jekyll _data directory. Pocket’s API uses a “=>” format, which seems to make Jekyll barf when recompiling.

I’m using a simple regex to convert all “=>” tags to ": ", which passes Jekyll’s JSON parser. However the original seems to be getting through.

data file contents:

{“status”: 1, “complete”: 1, “list”: {“3386186011”: {“item_id”: “3386186011”, “resolved_id”: “3386126548”, “given_url”: “No, we don’t use Kubernetes”,

as rendered in a draft post (using {{records[“list”]}}):

{“3386186011”=>{“item_id”=>“3386186011”, “resolved_id”=>“3386126548”, “given_url”=>“No, we don’t use Kubernetes”,

It looks like I’m pointing to the correct data file. Am I missing something about Jekyll preprocessing?

I kinda think I have seen that format in jekyll output before. Have you tried using the data as you intend to see if it works? is there an issue?

The post is rendering correctly (strangely enough). I was worried that I was pointing to a previous data file, which doesn’t seem to be the case.

If you are sure you are pointing to the correct file, you might want to delete the contents of the _site folder and rebuild your Jekyll site to see if you get different results. Not seeing the contents of the JSON file or the code that renders the page it is hard to tell what might be going on.

I am having the same issue described by the OP and I tried the solution proposed in your post but the issue keeps present itself… Is there something else I should try?

Could you please share a link to your repository?

no need, I solved the issue just today.
I was using the wrong liquid filter: {{ foo | json }} instead of {{ foo | jsonify }} .
Now the json parses correctly.
Sorry for the noise!

Cool and glad you figured it out!