This month’s updates and changes.
The page on a device-based json encoder is a good start, but it needs to be extended if a user wants it to generate valid json.
- Non serialisable objects should either be ignored or represented as a string. If a function, instance, blob, meta etc is included in the passed container, the code will add its type. That will be fine for debug outpupt, but will fail a validation test. It should probably be wrapped in quotes to make it genuine json, or quietly dropped from the output.
- The code doesn’t generate safe strings. This will definitely catch you out if you try saving it in the agent with server.save()
- It doesn’t support float. This might not be as simple as saying obj.tostring() as squirrel default conversion will drop points of precision.