You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, Am new to json format data and c++ too. I found it amusing, it is very easy to build a json when started to json generator example. And it is simple to use. Now lets see what my doubt is.
By using ArduinoJson library i can serializeJson to a character array and to a uart port like Serial1 or SerialUSB.
Similarly same can be done with serializeMsgPack. Now the tricky part is i need to use unsigned char for serialize message pack.
I did saw a "Custom Writer" could be a solution, but didnt have a clue to use it. Does it need to be added in the library files or in the program(.ino) files i have been using.
If i call serializeMsgPack(doc,(uint8_t) data) getting following error
_In member function 'size_t CustomWriter::write(uint8_t)':
abputilitypacket:22:9: error: request for member 'append' in '((CustomWriter*)this)->CustomWriter::str', which is of non-class type 'uint8_t {aka unsigned char}'
str.append(1, static_cast<char>(c));
^_
If i could solve this i can move forward in my project. And thanks in advance.
The text was updated successfully, but these errors were encountered:
Hi, Am new to json format data and c++ too. I found it amusing, it is very easy to build a json when started to json generator example. And it is simple to use. Now lets see what my doubt is.
By using ArduinoJson library i can serializeJson to a character array and to a uart port like Serial1 or SerialUSB.
Similarly same can be done with serializeMsgPack. Now the tricky part is i need to use unsigned char for serialize message pack.
I did saw a "Custom Writer" could be a solution, but didnt have a clue to use it. Does it need to be added in the library files or in the program(.ino) files i have been using.
If i call serializeMsgPack(doc,(uint8_t) data) getting following error
_In member function 'size_t CustomWriter::write(uint8_t)':
abputilitypacket:22:9: error: request for member 'append' in '((CustomWriter*)this)->CustomWriter::str', which is of non-class type 'uint8_t {aka unsigned char}'
If i could solve this i can move forward in my project. And thanks in advance.
The text was updated successfully, but these errors were encountered: