JSON and Uint8Array #610
Replies: 3 comments
-
Posted at 2016-08-21 by ClearMemory041063 Almost a fix!
The output:
Problem the 7 gets changed to 97 Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-08-21 by ClearMemory041063 A fix using atob() and btoa() functions.
The output:
Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-08-22 by @gfwilliams Thanks - yes, this is a bit of a pain... There's a bug open for it here: espruino/Espruino#489 Basically the 'standard' JavaScript way of handling Typed Arrays is horrible (turning them into objects), and I don't really want to implement it - but then I don't want to implement something that's not standards compliant either. If you want to parse the 'semi-JSON' you get from |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-08-21 by ClearMemory041063
Problem with var x=JSON.parse(JSON.stringify(Obj));
When Obj contains an Uint8Array(N). x is undefined/
The output:
Beta Was this translation helpful? Give feedback.
All reactions