Merge: json: move up general services, support Byte and more
authorJean Privat <jean@pryen.org>
Thu, 7 Sep 2017 14:48:56 +0000 (10:48 -0400)
committerJean Privat <jean@pryen.org>
Thu, 7 Sep 2017 14:48:56 +0000 (10:48 -0400)
commitdde8b54e3fef7968920907152bda99467eb92cc5
tree0f1dbb1819b7a148fc5f5c1db36079e2693d317f
parent3cf66718954692e492d3edb94cdb3df1aa6d2769
parentd747fd5091a6553587da042b153c76ac00816da9
Merge: json: move up general services, support Byte and more

This PR is a general clean up of the `json` package to prepare the support of two new serialization engines, add small new features and fix some issues in code. It should not change its behavior for existing clients.

* Move up some general deserialization services from `json` to `serialization` in order to make them available to other engines. This includes the class name manipulation services and safety services controlling which types are deserialized, including `class_inheritance_metamodel`.

* Support writing and reading `Byte` as either a plain JSON string or a special object with metadata.

* Support reading `Char` and `Byte` from plain JSON input using simple heuristics.

* Test the deserialization of plain generated JSON and fix a typo in the tests.

* Fix other minor issues in code.

Pull-Request: #2538
lib/json/serialization_read.nit