v1.1.0
·
22 commits
to master
since this release
Support for serialization to JSON.
Change Log
- serialization to JSON:
json.to_json()function — this function calls thedata.to_data()function and then transforms the data into the JSON;json.from_json()function — this function transforms the text in the JSON to a data:- optionally, it can validate the data against a JSON Schema.
Features
data.to_data()function — this function recursively calls the__data()metamethod if it exists;- serialization to string:
string.to_string()function — this function calls thedata.to_data()function and then applies library inspect.lua;Stringifiablemixin — this mixin adds the__tostring()metamethod that calls thestring.to_string()function;
- serialization to JSON:
json.to_json()function — this function calls thedata.to_data()function and then transforms the data into the JSON;json.from_json()function — this function transforms the text in the JSON to a data:- optionally, it can validate the data against a JSON Schema.