Example of logic in JSON.
Added toJsonString().
Doc.