activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clebert Suconic <clebert.suco...@gmail.com>
Subject Re: Artemis: Use software for "no Evil"
Date Wed, 15 Jun 2016 16:25:07 GMT
I looked at what would need to be done if we were going the
google-simple JSON approach.


The API is fairly simpler, it has no support for getString methods,
instead everything is a get() and you need to use casting to the
object.

Example:


String value = (String)jsonObject.get("value");


Instead of


String value = jsonObject.getString("value");


Besides this we will need to add the new jar to the distribution and
OSGI. It's a fairly simple change.. just needs to make a few api
changes and stuff like that.. it's not that bad.


@John: did you have experience with this other package you mentioned?






Clebert


PS: Any time I say *we* on my emails, I mean as in Apache ActiveMQ..
meaning We as in the developers. If i was talking about the company I
work for or any third party i would write it in the third person.


On Tue, Jun 14, 2016 at 6:41 PM, Clebert Suconic
<clebert.suconic@gmail.com> wrote:
> I was just reading about it.
>
> The only requirement I see is not to break the API contract on management.
>
> Most of the JSON we have is for management responses, where we return
> objects as JSON Arrays or JSON Objects.
>
> Apparently using JSONP would change the responses we have on management?
>
> Changing this to JSON-P would apparently mean we have to add a
> function name to the return?
>
> i.e... say... getConnectionsAsJSON currently returns this on the MBean Console:
>
> [{"creationTime":1465943892043,"connectionID":"-1350038013","clientAddress":"/127.0.0.1:64627"},{"creationTime":1465943895399,"connectionID":"1668184153","clientAddress":"/127.0.0.1:64628"}]
>
>
>
> apparently it would start to return something with a function name:
> that is: getConnectionsAsJSON([......])
>
>
> Which would be an incompatible change for a point release.
>
>
> If we can use the library you mentioned but keeping the same output
> through management without breaking a contract like this, it would be
> fine.
>
>
> How do you see it?
>
> On Tue, Jun 14, 2016 at 5:30 PM, John D. Ament <johndament@apache.org> wrote:
>> Clebert,
>>
>> Would you be interested in an impl based on the JSON-P spec?  If so maybe
>> Johnzon would be a solution here.
>>
>> John
>>
>> On Tue, Jun 14, 2016 at 5:21 PM Clebert Suconic <clebert.suconic@gmail.com>
>> wrote:
>>
>>> Accordingly to apache legal, we can use JSON on our codebase, however
>>> other projects may be unable to redistribute your code if you use this
>>> license because of the:
>>>
>>> "The Software shall be used for Good, not Evil."
>>>
>>> (http://www.apache.org/legal/resolved.html#json)
>>>
>>>
>>> So, Fedora guys are asking us to replace this on Artemis.
>>> (https://issues.apache.org/jira/browse/ARTEMIS-565)
>>>
>>>
>>>
>>>
>>>
>>> I looked at HBase and they have been through the same path apparently,
>>> where they replaced it by
>>> https://code.google.com/archive/p/json-simple/
>>>
>>>
>>>
>>>
>>> More fun reading at: https://issues.apache.org/jira/browse/ARTEMIS-565
>>>
>>>
>>>
>>> Any volunteer to make the change? :)
>>>
>>>
>>>
>>> --
>>> Clebert Suconic
>>>
>
>
>
> --
> Clebert Suconic



-- 
Clebert Suconic

Mime
View raw message