Skip to content
New issue

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

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

Already on GitHub? # to your account

MessagePack Support? #358

Closed
mahmed8003 opened this issue Sep 24, 2016 · 8 comments
Closed

MessagePack Support? #358

mahmed8003 opened this issue Sep 24, 2016 · 8 comments
Milestone

Comments

@mahmed8003
Copy link

Is it possible to have MessagePack support.
Instead of printing JSON string to buffer using this method
size_t prettyPrintTo(char *buffer, size_t bufferSize)
can we have another method like
size_t msgPackPrintTo(char *buffer, size_t bufferSize)

Use case:

  • Final buffer size could be smaller and it can reduce the network data usage where sensor sending lot of data in json string.
  • Instead of storing plain JSON string to SPIFFS we can store small msgPack buffer. It will reduce file size.
@bblanchon
Copy link
Owner

bblanchon commented Sep 25, 2016

This sound like a good idea, and that's 100% aligned with the philosophy of ArduinoJson.
However, I'm afraid most users would prefer the official implementation instead of ArduinoJson...

Also, it looks like there will be a lot of testing, so I'd like to see how much traction this feature gets before writing a lot of code.

Let's see how many upvotes 👍 (or downvotes 👎) we get on this feature request.

@heman4t
Copy link

heman4t commented Sep 26, 2016

When its about...

Final buffer size could be smaller and it can reduce the network data usage where sensor sending lot of data in json string.

I upvote. For me size is equally important to performance in micro controllers.

@sticilface
Copy link

I'd be keen on this. reducing the buffer size is great from my end! limited ram and all..

@cosmikwolf
Copy link

upvote. I want to use arduino JSON to store data on local storage, but it is not efficiently packed. Would love a way to reduce the output size. Even just storing variables in their hex format would be good.

@cosmikwolf
Copy link

ArduinoJSON is miles ahead of the msgPack arduino implementation, would way rather use ArduinoJSON for this purpose.

@bblanchon
Copy link
Owner

Branch 5.8.x seems to be quite stable now.
I'll now focus on this feature.

@bblanchon bblanchon added this to the 6.0 milestone Feb 11, 2017
@Matheus-Garbelini
Copy link

Matheus-Garbelini commented Feb 19, 2018

@bblanchon, @mahmed8003, @cosmikwolf there's a new PR of mine that includes an initial support to messagepack: #682, if anyone could test more with an arduino I'd be glad. Thanks.

@bblanchon
Copy link
Owner

MessagePack is finally available in ArduinoJson 6.0.0

Repository owner locked and limited conversation to collaborators Oct 6, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

6 participants