dropbox / json11

A tiny JSON library for C++11.
MIT License
2.55k stars 616 forks source link

Example to read a file #99

Closed j-k closed 7 years ago

j-k commented 7 years ago

It would be nice to have some example code how to read out and parse a file.

artwyman commented 7 years ago

Wouldn't hurt, but since JSON11 parses any string, it seems out-of-scope to cover various ways to get data into a string (file, network, etc). There are some easy examples of that to find elsewhere, e.g: http://stackoverflow.com/questions/2602013/read-whole-ascii-file-into-c-stdstring