0

How do I create an ndjson file in Visual Studio using the correct schema. At the moment I am getting the following error because my json is not being recognised. I know it is correct because I'm able to issue a Web request via Fiddler with it.

enter image description here

Relequestual
  • 11,631
  • 6
  • 47
  • 83
litterbugkid
  • 3,534
  • 7
  • 36
  • 54
  • 1
    Are you saving this as a .json or .ndjson file? Looks like VS thinks it's a JSON file. – Relequestual Feb 06 '19 at 10:53
  • @Relequestual saving as a .json. I didn't realise there was such thing as a .ndjson file, should I save as this instead? I suppose I cant use JSON Path to manipulate it either? – litterbugkid Feb 06 '19 at 11:00
  • Sorry I have no idea. I just did a google and found a plugin which expects .ndjson extension to recognise NDJSON files: https://marketplace.visualstudio.com/items?itemName=buster.ndjson-colorizer – Relequestual Feb 06 '19 at 11:03
  • Have you read the spec for NDJSON? Your file is not a valid NDJSON file. It cannot have newlines except to separate JSON elements. The real problem is still that you need the extension to have it recognize the new filetype. – RedX Feb 06 '19 at 13:26
  • @RedX Thanks for the info however the JSON schema formatted it for me, I didn't insert the newlines myself :) – litterbugkid Feb 07 '19 at 10:42
  • I saved it as a .ndjson already - thanks. – litterbugkid Feb 07 '19 at 10:42

0 Answers0