Melang

Logo

A script language of preemptive scheduling coroutine in single thread

View the Project on GitHub Water-Melon/Melang

JSON

mln_json_encode
@mln_json_encode(array);

Input:

Return value:

Error:

mln_json_decode
@mln_json_decode(s);

Input:

Return value:

Error:

Example
a = ['name': 'Tom', 'age': 18, 'gender': 'male'];
json = @mln_json_encode(a);
@mln_print(json);
@mln_print(@mln_json_decode(json));

The output is:

{"age":18.000000,"name":"Tom","gender":"male"}
[18.000000, Tom, male, ]