neo4j: Add a class for errors that are specific to Neo4j.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
json: Accept only standard escaping.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
json: Move `to_json_value` to `Text`.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
json: Parse all standard escape sequences.

Only escaped UTF-16 wydes above 127 are not supported yet.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
json: Add the `Jsonable` interface.

Add an interface for objects that can be translated into JSON.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
json: Make `json_to_nit_object` returns a `Jsonable`.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
json: Add `JsonParseError`.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
json: Return a `JsonParseError` on failure.

Distinguish an error from `null`.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
json: Rename `json_to_nit_object` to `parse_json`.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
json: Document `parse_json`.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
json: Update the documentation of the main module.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
json: Add `JsonValue.json_type`.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
json: Add error handling to `dynamic`.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
neo4j: Use the `json` library.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
json_serialization: Use `to_json` to escape characters.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
nitdoc: Use `to_json` to escape JSON values.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
json: Allow to buffer writings.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Merge: json: Refactor the APIs

Refactor the `json` library taking feedback of @privat, @Morriar and @xymus into account. Also, correct some bugs related to JSON encoding/decoding and remove ad hoc escaping routines.

TODO: Support Unicode escaping.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

Pull-Request: #907
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>