简体   繁体   English

Json用Arduino Uno解析

[英]Json parsing with arduino uno

Hi I was wondering if there is a way to parse json response from a server. 嗨,我想知道是否有一种方法可以解析服务器的json响应。

I'm using arduino uno with a wifi shield. 我正在使用带有wifi屏蔽的arduino uno。 Also is it advisable to process json? 还建议处理json吗? I read that the uno may have too little memory for this. 我读到uno可能对此记忆不足。

I guess you are communicating with you wifi shield via USART. 我想您正在通过USART与wifi屏蔽通信。 So you read characters/Strings. 因此,您阅读字符/字符串。 Why shouldn't you be able to parse them any way you like? 您为什么不能够按自己喜欢的方式解析它们? Depending on how trivial your json is you could roll your own parser or have a look at ajson . 根据您的json的琐碎程度,您可以滚动自己的解析器或查看ajson

Memory should not be a problem as long as your json documents are relatively small (< ~1k). 只要您的json文档相对较小(<〜1k),内存就不成问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM