Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested JSON key data pairs #8

Closed
peterstedman opened this issue Nov 23, 2015 · 5 comments
Closed

Nested JSON key data pairs #8

peterstedman opened this issue Nov 23, 2015 · 5 comments

Comments

@peterstedman
Copy link

I'm using the Embedded C SDK for our application and am having an issue writing shadow JSONs. I want to be able to nest key / data pairs but I don't think the SDK supports it.

This is an example of what I want to write:

"rfids" : {
"160035E055" : {
"active" : false
},
"160073640A" : {
"active" : false
}
},

But I can't see a way that the SDK's APIs will let me do this. Is that correct?

@bhadrip
Copy link
Contributor

bhadrip commented Nov 23, 2015

@peterstedman
Yes, the current SDK API will not let you create nested JSON's. This API was built with very simple use case for constrained device in mind.

One way to send your JSON will be to construct it by yourself and use this Update api. char *pJsonString will be your JSON document.

Remember to add a Client Token to the JSON document created. This will help the SDK to track the update/accepted and update/rejected. In the absence of a client token, the SDK will not keep track of this update status.

Thanks for using the SDK. Please let us know if you need more information.

Bhadri

@ahmedammar
Copy link

Just to add to this, we have actually replaced jsmn with yajl internally, allowing much more control over building the json structures etc ...

@chaurah
Copy link
Contributor

chaurah commented Nov 19, 2016

Hi @peterstedman,
We now have a C++ SDK that allows Nested Json parsing. You can find it here. We are going to include this option in the next release of Embedded C SDK as well. Apologies for the long delay on this.

Rahul

@peterstedman
Copy link
Author

Hi Rahul,

Thanks for keeping us in mind with this. I will take a look when I can,
although we are using a different method now to communicate with AWS.

Peter

On Fri, Nov 18, 2016 at 7:36 PM, Rahul Singh Chauhan <
[email protected]> wrote:

Hi @peterstedman https://github.com/peterstedman,
We now have a C++ SDK that allows Nested Json parsing. You can find it
here https://github.com/aws/aws-iot-device-sdk-cpp. We are going to
include this option in the next release of Embedded C SDK as well.
Apologies for the long delay on this.

Rahul


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#8 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/APPuZTmmWBFgArOWwD-3BBGigR09AqTsks5q_lK4gaJpZM4Gn0B3
.

Peter Stedman, Scout Alarm
Lead Embedded Engineer
114 W Illinois Street
Chicago, IL, 60654
C: (815) 325-4351 W: www.scoutalarm.com

@pctj101
Copy link

pctj101 commented Nov 28, 2017

Would also be interested in this if it doesn't blow memory usage out of the water :)

aggarw13 added a commit that referenced this issue Nov 9, 2019
…ializer

Support infinite length containers in tinycbor decoder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants
@pctj101 @ahmedammar @bhadrip @chaurah @peterstedman @hedeshianaws @gordonwang0 and others