<commit_before># json2cpp
##### python script that generates c++ mapping classes for a given json


The typical c++ json parser library, loads json values into a map(string->variant), which discards all static checking that might be done by a compiler (error prone at runtime).

If a well known, fixed json format is used, direct mapping to c++ classes/members (preserving types) will allow typesafe client code.

##About
* generates c++ (11) classes with json load/save methods
* each json object becomes a c++ class, each json property becomes a c++ class member
* generated code still relies on a third party json parser library, currently [cpprest](https://github.com/Microsoft/cpprestsdk)
* json arrays must be homogeneous (all elements must have same 'type')
* the original script is available [here](https://gist.github.com/soharu/5083914). (no subobjects supported)






<commit_msg>Add a Bitdeli badge to README<commit_after># json2cpp
##### python script that generates c++ mapping classes for a given json


The typical c++ json parser library, loads json values into a map(string->variant), which discards all static checking that might be done by a compiler (error prone at runtime).

If a well known, fixed json format is used, direct mapping to c++ classes/members (preserving types) will allow typesafe client code.

##About
* generates c++ (11) classes with json load/save methods
* each json object becomes a c++ class, each json property becomes a c++ class member
* generated code still relies on a third party json parser library, currently [cpprest](https://github.com/Microsoft/cpprestsdk)
* json arrays must be homogeneous (all elements must have same 'type')
* the original script is available [here](https://gist.github.com/soharu/5083914). (no subobjects supported)









[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/kcris/json2cpp/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

{'fraction_non_alphanumeric': 0.09180497925311204, 'fraction_numerical': 0.013485477178423237, 'mean_word_length': 4.86322188449848, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6826948', 'n_tokens_mistral': 535, 'n_tokens_neox': 503, 'n_words': 247}