IBMStreams / administration

Umbrella project for the IBMStreams organization. This project will be used for the management of the individual projects within the IBMStreams organization.
Other
19 stars 10 forks source link

Toolkit suggestion: updated JSONHelper using SPL Java Operator API #21

Closed jms90h5 closed 10 years ago

jms90h5 commented 10 years ago

Since the JSONEncoding interface has been added to the SPL Java Operator API it would seem to be a good idea to update the JSONHelper toolkit to use it. Not only would it simplify the implementation, it would ensure that exactly the same underlying encoding logic was executed regardless of access mechanism.

The only reason I can think of to keep the "manual" implementation is to allow for a some kind of different encoding than what the Java Operator API does. In that case it would be useful to have a second helper toolkit that uses the native API to allow SPL programmers to convert tuples to and from JSON using that encoding logic without everyone having to create their own custom java operator.

ddebrunner commented 10 years ago

+1 to a JSON toollkit

ddebrunner commented 10 years ago

I have a simple operator that converts tuples to JSON, using the Java Operator API JSON mapping.

hildrum commented 10 years ago

I think it'd be nice for that to go up in conjunction with the JSON to tuple operator from @rohitsw here: https://www.ibm.com/developerworks/community/files/app?lang=en#/file/d8bd5118-4587-4b3e-b43e-4b1717f8691f

mikespicer commented 10 years ago

+1 for a JSON toolkit.

I think we may want to provide a common toolkit which includes a number of parsers and formatters for different types in the future. I think it makes sense to start with separate type specific toolkits like JSON and decide if we want to package or converge similar toolkits in the future rather than start off with a common toolkit and concerns over getting the structure right before we know how it might evolve.

rohitsw commented 10 years ago

I have modified my JSON toolkit to work with the latest streams version and use the operator json type. i plan to name them: com.ibm.streamsx.parsers.json Should we have a new repository "streamsx.parsers" or simply add it to the toolkit repository?

mikespicer commented 10 years ago

I had thought a parsers toolkit with many formats would be desirable but I'm leaning more towards a JSON toolkit now. We could always combine toolkits to have a parsers one in the future.

ddebrunner commented 10 years ago

@rohitsw The toolkits repository is not for SPL code, it's just a project to manage the community.

rohitsw commented 10 years ago

i've submitted a new issue to create a streamsx.parsers repository where I can put the json toolkit

ddebrunner commented 10 years ago

The current plan is a repository per toolkit, so there would be a streamsx.json repository.

ddebrunner commented 10 years ago

I created streamsx.json.

Creating the correct permissions is still to be done, but it can be forked and pull requests created.

Note I did not include parsers in the name, just defined it as a toolkit for using JSON in SPL, There could be other JSON related functionality that are not parser related.