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

in_serial: Support JSON Format #82

Closed
toru-takahashi opened this issue Jun 20, 2016 · 2 comments
Closed

in_serial: Support JSON Format #82

toru-takahashi opened this issue Jun 20, 2016 · 2 comments
Assignees
Milestone

Comments

@toru-takahashi
Copy link

in_serial plugin read a stream of bytes, so the only thing is that user need to specify a delimiter string so the plugin can know when a message ends and a new one begins.
But, adding delimiter to JSON format is not suitable.

The request is that in_serial supports JSON Format.

@edsiper edsiper self-assigned this Jun 20, 2016
edsiper added a commit that referenced this issue Jun 21, 2016
this patch add support for raw JSON messages over the serial
interface, it can receive multiple messages and parse them upon
arrival time.

Note this implementation (as of this patch) is still under development
as there is some issues with lib/jsmn. A bad former JSON message
may generate incorrect messages. I have logged an issue here:

  zserge/jsmn#81

In order to enable JSON support the 'Format' property must to be set
with the 'json' value, e.g:

  [INPUT]
      Name serial
      ...
      Format json

Signed-off-by: Eduardo Silva <eduardo@treasure-data.com>
@edsiper
Copy link
Member

edsiper commented Jun 21, 2016

The serial_json branch contains the implementation of this requested feature. As described in the 7d4700e commit, there is an issue in the used lib/jsmn library when some bad formed JSON message is received.

The following issue have been logged with jsmn team:

zserge/jsmn#81

note: functional but still under development

@edsiper edsiper added this to the 0.7 milestone Jun 21, 2016
@edsiper
Copy link
Member

edsiper commented Oct 11, 2016

in_serial is an already merged feature. Closing this issue and opening a new one #117 to track jsmn updates

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

2 participants