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

GSN wrapper for JSON data? #37

Open
kjorg50 opened this issue Nov 17, 2014 · 3 comments
Open

GSN wrapper for JSON data? #37

kjorg50 opened this issue Nov 17, 2014 · 3 comments
Labels

Comments

@kjorg50
Copy link
Contributor

kjorg50 commented Nov 17, 2014

Let's say I wanted to use a third-party API as a data source, for example, Weather Underground. This API accepts GET requests and produces JSON in return (for the most part). Is there a way I could define a virtual sensor that can connect to an API and accept JSON data? I suppose this might be similar to the CSV Wrapper. Would the HTTP GET wrapper be appropriate for this?

Thanks!

@ebiiii
Copy link
Contributor

ebiiii commented Nov 17, 2014

The closest wrapper to your needs is the HTTP GET wrapper, but it was only written as an example getting data from a webcam. You could implement a new wrapper with almost the same structure but parsing the input stream with for example GSON and setting in the parameters of the wrapper the structure of the output (data fields and types, like in the Direct-Remote-Push wrapper )
You may end up with a pretty static mapping from the fields in Json, but if you succeed to make it generic enough we would be happy to merge your contribution to the master branch of GSN.

@kjorg50
Copy link
Contributor Author

kjorg50 commented Nov 18, 2014

Thank you for such a quick reply! I will have to investigate this further

@ebiiii ebiiii added the question label Mar 6, 2015
@dandrocec
Copy link

Is the mentioned feature (GSN wrapper for JSON data) implemented in meantime?

Thanks,
Darko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants