Open ghost opened 4 years ago
well this is kinda late, but I would recommend using jsoncons, it lets you load a json file or string into a json object, modify it, and then just dump the object as string.
Now if you only want to take a json file and put it in a response you can just read it as string, and then pass that string with the header Content-Type: application/json
.
How to load and serve JSON file ?