JSON marshalling
diego.bernini
Posts: 8
Hi,
Netlinx provides primitive functions to encode/decode variables (even structures) to plain strings sand XML strings.
I found several posts stating that some works have been made by AMX firmware engineers to provides functions for support parsing of JSON strings.
My question (rather a proposal) to AMX firmware engineers is: could you provide a function for encoding/decoding structures to JSON strings and vice-versa?I mean STRUCTURE_TO_JSON and JSON_TO_STRUCTURE
I think this could be very useful for dealing with Web Services, which nowadays are based on JSON and the REST approach.
Anyway I plan to start to experiment Caf? Duet soon: I suspect that is the right place for developing modules interacting with Web Services, exploiting Java classes for interacting with them and the conversion with JSON.
Best,
Diego
Netlinx provides primitive functions to encode/decode variables (even structures) to plain strings sand XML strings.
I found several posts stating that some works have been made by AMX firmware engineers to provides functions for support parsing of JSON strings.
My question (rather a proposal) to AMX firmware engineers is: could you provide a function for encoding/decoding structures to JSON strings and vice-versa?I mean STRUCTURE_TO_JSON and JSON_TO_STRUCTURE
I think this could be very useful for dealing with Web Services, which nowadays are based on JSON and the REST approach.
Anyway I plan to start to experiment Caf? Duet soon: I suspect that is the right place for developing modules interacting with Web Services, exploiting Java classes for interacting with them and the conversion with JSON.
Best,
Diego
0
Comments
How is your progress with Duet and Web Services. I am also planning to go this route.
For encoding, here's a kludgy include that I use. It's pretty limited, however useful enough for building the contents of most POST requests or similar.
Actually, I have to start: now I am very busy on fixing/enhancing several AMX systems coded with Netlinx...I hope to start with Duet soon...
Many, many thanks!