<commit_before>= libjsonp

== API

Provides a drop-in pointer extension to jansson. Also provides some extension functions to jansson to unify its object / array APIs.

=== The following pointer functions exist:

These functions support tilde encoded pointers. The "create" functions also support an extension which allows type setting of pointer parts. The extension is based on the ~ escape character, there ~<first type letter> indicates the type. Without the extesion JSON pointers are a little ill-equiped to support easy creation scenarios.

 Example: Consider json an empty new opject. create(json, "/foo~a/-/bar", "moo") creates an array foo and adds a new object containing the attribute bar with the value moo. "~a" here is the extension to allow to express "this is an array". On the same json object, create(json, "/foo~i" 3.141); overrides "foo" with the integer 3. Create has a few other cases (default override of null for instance) that should work as most people would expect.

 json_t *jsonp_create(json_t *json, const char *pointer, json_t *value);
 json_t *jsonp_create_new(json_t *json, const char *pointer, json_t *value);
 json_t *jsonp_get(json_t *json, const char *pointer);
 int jsonp_set(json_t *json, const char *pointer, json_t *value);
 int jsonp_set_new(json_t *json, const char *pointer, json_t *value);
 int jsonp_delete(json_t *json, const char *pointer);

=== The following URL encoding pointer functions exist:

These functions support tilde and URL encoded pointers. Like above, the "create" functions also support an extension which allows type setting of pointer parts. Unlike above the type setting is also possible via the non-printable URL encoding parts %00 - %07 (see janssons type enum or jansson_extension.c for more).

 Example: Consider json an empty new opject. create(json, "/foo%01/-/bar", "moo") creates an array foo and adds a new object containing the attribute bar with the value moo. "%01" here is the extension to allow to express "this is an array". On the same json object, create(json, "/foo%03" 3.141); overrides "foo" with the integer 3. Create has a few other cases (default override of null for instance, null value (touch) support) that should work as most people would expect.
<commit_msg>fixed readme<commit_after>= libjsonp

== API

Provides a drop-in pointer extension to jansson. Also provides some extension functions to jansson to unify its object / array APIs.

=== The following pointer functions exist:

These functions support tilde encoded pointers. The "create" functions also support an extension which allows type setting of pointer parts. The extension is based on the \~ escape character, there \~<\first type letter> indicates the type. Without the extesion JSON pointers are a little ill-equiped to support easy creation scenarios.

 An Example: Consider json an empty new opject. 
 create(json, "/foo~a/-/bar", "moo") creates an array foo
 and adds a new object containing the attribute bar with the value moo.
 "~a" here is the extension to allow to express "this is an array".
 On the same json object, create(json, "/foo~i" 3.141) overrides "foo"
 with the integer 3.
 Create has a few other cases (default override of null for instance)
 that should work as most people would expect.

 json_t *jsonp_create(json_t *json, const char *pointer, json_t *value);
 json_t *jsonp_create_new(json_t *json, const char *pointer, json_t *value);
 json_t *jsonp_get(json_t *json, const char *pointer);
 int jsonp_set(json_t *json, const char *pointer, json_t *value);
 int jsonp_set_new(json_t *json, const char *pointer, json_t *value);
 int jsonp_delete(json_t *json, const char *pointer);

=== The following URL encoding pointer functions exist:

These functions support tilde and URL encoded pointers. Like above, the "create" functions also support an extension which allows type setting of pointer parts. Unlike above the type setting is also possible via the non-printable URL encoding parts %00 - %07 (see janssons type enum or jansson_extension.c for more).

 An Example: Consider json an empty new opject.
 create(json, "/foo%01/-/bar", "moo") creates an array foo
 and adds a new object containing the attribute bar with the value moo. "%01" here is the extension to allow to express "this is an array".
 On the same json object, create(json, "/foo%03" 3.141) overrides "foo"
 with the integer 3.
 Create has a few other cases (default override of null for instance,
 null value (touch) support) that should work as most people would expect.

{'fraction_non_alphanumeric': 0.07483443708609272, 'fraction_numerical': 0.008830022075055188, 'mean_word_length': 4.685069008782936, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '1250780', 'n_tokens_mistral': 1253, 'n_tokens_neox': 1199, 'n_words': 659}