I was wondering if there was a JSON formatter that could take a string and convert it to proper JSON. I checked the cJSON library and it seems to only be supported through nRF connect SDK 1.2.0, and it also didn't have any functions for formatting the JSON. Is there anything available to do this?
This may be outside of Nordic's scope as it is an amazon web service issue but I'm trying to pass correctly formatted JSON to an AWS endpoint. Currently I'm just using snprintk and formatting myself:
snprintk(testJSON, 75, "{\"Start_Time\": \"%s\", \"End_Time\": \"%s\"}", time_pairs[0].startTime, time_pairs[0].endTime);
on AWS. However on AWS I get the error 'Message cannot be displayed in specified format' even though the message received on Amazon {"Start_Time": "10:44:56 2/3/22", "End_Time": "11:4:1 2/3/22"} passes JSON validators.
I was wondering if there was something wrong or if there was a specific function needed to avoid this error.
Thanks.