Merge: json::serialization: intro services to easily serialize to and from Json
authorJean Privat <jean@pryen.org>
Mon, 9 Nov 2015 15:39:19 +0000 (10:39 -0500)
committerJean Privat <jean@pryen.org>
Mon, 9 Nov 2015 15:39:19 +0000 (10:39 -0500)
commitfde422cf577b3aa9ed913004b0cb56df6d5921b0
tree33dd8e413457b14bd2e16b939972ce29c4ab149c
parent46a54a99fcde1527de897b897d0273892cd189b8
parentd612bb0d46971a96cbd804aa54358326fbc4b3ac
Merge: json::serialization: intro services to easily serialize to and from Json

The services `to_json_string` and `from_json_string` should be useful for simple scripts. Both services report errors only on the console. This behavior is enough for simple scripts but more complex programs should still use `Serializer` and `Deserializer` services.

This methods may look a lot like `to_json` and `to_plain_json`. I plan to replace `to_json` with either `to_plain_json` to preserve the same behavior but with support for all serializable classes, or `to_json_string` to get JSON with metadata. Note that even if the output contains metadata, it is readable by external tools with a small overhead.

If you have a better idea for the names, please mention it. For my part, I consider these names temporary until we free the `to_json` names...

Pull-Request: #1822
Reviewed-by: Jean Privat <jean@pryen.org>