hdk-assemblyscript
hdk-assemblyscript copied to clipboard
WIP: Decoding function parameters from JSON string
Here is a proposed solution to parsing the parameters to a function passed as a JSON string.
This current implementation only supports primitives and string arguments but extending it to also accept objects and arrays should not be too difficult.
It uses asm-json-parser which is a module I write for event driven JSON parsing in assemblyscript. Using this to define a parser for a custom class is pretty straightforward and most of this boilerplate will be generated by the transform stage.
Inviting feedback and comments before going further
Closes #4