[jira] [Commented] (TAP5-2575) Replace json.org-licensed classes with Apache-compatible versions

2017-03-06 Thread Ted Dunning (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15897722#comment-15897722
 ] 

Ted Dunning commented on TAP5-2575:
---

You are correct that open json is not a long-term solution.

I, personally, would recommend Jackson. I have tried Gson and while it is 
generally pretty nice, it does eat massive amounts of memory under some 
circumstances.



> Replace json.org-licensed classes with Apache-compatible versions
> -
>
> Key: TAP5-2575
> URL: https://issues.apache.org/jira/browse/TAP5-2575
> Project: Tapestry 5
>  Issue Type: Task
>  Components: tapestry-json
>Affects Versions: 5.3.8, 5.4.1
>Reporter: Bob Harner
>
> Because of [license issues|https://www.apache.org/legal/resolved#json], we 
> need to replace all json.org-licensed classes with alternative classes having 
> an Apache-approved license. Apache legal has imposed a deadline of April 30, 
> 2017.
> Tapestry apparently includes 3 classes that are, starting in version 5.2, 
> "repackaged, improved (and tested) version of code originally from json.org." 
> These 3 all include D. Crockford's "The Software shall be used for Good, not 
> Evil" statement in the JSON license at the top.
> The 3 classes are:
> * JSONArray.java
> * JSONTokener.java
> * JSONObject.java
> Other Apache projects (including Wicket) have successfully switched to 
> https://github.com/tdunning/open-json, which contains versions of the above 3 
> classes that are purported to be mostly compatible with the current versions 
> from json.org. However, there have been changes to Tapestry's own version 
> since the original copy was made (May 2008 or possibly earlier), and those 
> changes would need to be re-applied. Some examples:
> * TAP5-1153: When in development mode, Tapestry should pretty-print JSON 
> content
> * TAP5-2209 Make JSONObject and JSONArray implement Serializable
> * Make JSONArray.from() not care about what values are stored in Iterable
> * Add a new constructor to JSONObject to make it easier to initalize a 
> JSONObjects key/value pairs (if all strings)
> * Change generics signature for JSONArray.putAll() and JSONObject.putAll()
> * TAP5-2098: Maintain JSONObject keys & values in the order they were added
> * Add a copy() method to JSONObject
> * Add JSONArray.toList()
> * Add JSONArray.putAll()
> * Added remove(int index) to JSONArray
> * TAP5-1970: Make it easier to create JSONObject and JSONArray instances
> * Add JSONObject.toMap()
> * Add JSONObject.in(String) to create (if needed) and return a nested 
> JSONObject
> There are 116 unit tests for the JSON module. A starting point would be to 
> overlay the open-json classes and see what tests fail.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TAP5-2575) Replace json.org-licensed classes with Apache-compatible versions

2017-03-06 Thread Jochen Kemnade (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15897411#comment-15897411
 ] 

Jochen Kemnade commented on TAP5-2575:
--

{{javax.json}} is meant for immutable JSON, so it's not ideal. And we'd have a 
hard time supporting {{JSONLiteral}}. That's probably an issue with any 
specs-compliant JSON library we might decide to pull in.
I'm beginning to wonder if we should just rewrite {{tapestry-json}} from 
scratch.

> Replace json.org-licensed classes with Apache-compatible versions
> -
>
> Key: TAP5-2575
> URL: https://issues.apache.org/jira/browse/TAP5-2575
> Project: Tapestry 5
>  Issue Type: Task
>  Components: tapestry-json
>Affects Versions: 5.3.8, 5.4.1
>Reporter: Bob Harner
>
> Because of [license issues|https://www.apache.org/legal/resolved#json], we 
> need to replace all json.org-licensed classes with alternative classes having 
> an Apache-approved license. Apache legal has imposed a deadline of April 30, 
> 2017.
> Tapestry apparently includes 3 classes that are, starting in version 5.2, 
> "repackaged, improved (and tested) version of code originally from json.org." 
> These 3 all include D. Crockford's "The Software shall be used for Good, not 
> Evil" statement in the JSON license at the top.
> The 3 classes are:
> * JSONArray.java
> * JSONTokener.java
> * JSONObject.java
> Other Apache projects (including Wicket) have successfully switched to 
> https://github.com/tdunning/open-json, which contains versions of the above 3 
> classes that are purported to be mostly compatible with the current versions 
> from json.org. However, there have been changes to Tapestry's own version 
> since the original copy was made (May 2008 or possibly earlier), and those 
> changes would need to be re-applied. Some examples:
> * TAP5-1153: When in development mode, Tapestry should pretty-print JSON 
> content
> * TAP5-2209 Make JSONObject and JSONArray implement Serializable
> * Make JSONArray.from() not care about what values are stored in Iterable
> * Add a new constructor to JSONObject to make it easier to initalize a 
> JSONObjects key/value pairs (if all strings)
> * Change generics signature for JSONArray.putAll() and JSONObject.putAll()
> * TAP5-2098: Maintain JSONObject keys & values in the order they were added
> * Add a copy() method to JSONObject
> * Add JSONArray.toList()
> * Add JSONArray.putAll()
> * Added remove(int index) to JSONArray
> * TAP5-1970: Make it easier to create JSONObject and JSONArray instances
> * Add JSONObject.toMap()
> * Add JSONObject.in(String) to create (if needed) and return a nested 
> JSONObject
> There are 116 unit tests for the JSON module. A starting point would be to 
> overlay the open-json classes and see what tests fail.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TAP5-2575) Replace json.org-licensed classes with Apache-compatible versions

2017-03-06 Thread Jochen Kemnade (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15897256#comment-15897256
 ] 

Jochen Kemnade commented on TAP5-2575:
--

Thanks [~mgrigorov], that sounds as if we shouldn't use open-json after all 
since we're looking for a long-term solution and don't have to stay compatible 
to JSON-java.
I'm having a look at https://jsonp.java.net/index.html

> Replace json.org-licensed classes with Apache-compatible versions
> -
>
> Key: TAP5-2575
> URL: https://issues.apache.org/jira/browse/TAP5-2575
> Project: Tapestry 5
>  Issue Type: Task
>  Components: tapestry-json
>Affects Versions: 5.3.8, 5.4.1
>Reporter: Bob Harner
>
> Because of [license issues|https://www.apache.org/legal/resolved#json], we 
> need to replace all json.org-licensed classes with alternative classes having 
> an Apache-approved license. Apache legal has imposed a deadline of April 30, 
> 2017.
> Tapestry apparently includes 3 classes that are, starting in version 5.2, 
> "repackaged, improved (and tested) version of code originally from json.org." 
> These 3 all include D. Crockford's "The Software shall be used for Good, not 
> Evil" statement in the JSON license at the top.
> The 3 classes are:
> * JSONArray.java
> * JSONTokener.java
> * JSONObject.java
> Other Apache projects (including Wicket) have successfully switched to 
> https://github.com/tdunning/open-json, which contains versions of the above 3 
> classes that are purported to be mostly compatible with the current versions 
> from json.org. However, there have been changes to Tapestry's own version 
> since the original copy was made (May 2008 or possibly earlier), and those 
> changes would need to be re-applied. Some examples:
> * TAP5-1153: When in development mode, Tapestry should pretty-print JSON 
> content
> * TAP5-2209 Make JSONObject and JSONArray implement Serializable
> * Make JSONArray.from() not care about what values are stored in Iterable
> * Add a new constructor to JSONObject to make it easier to initalize a 
> JSONObjects key/value pairs (if all strings)
> * Change generics signature for JSONArray.putAll() and JSONObject.putAll()
> * TAP5-2098: Maintain JSONObject keys & values in the order they were added
> * Add a copy() method to JSONObject
> * Add JSONArray.toList()
> * Add JSONArray.putAll()
> * Added remove(int index) to JSONArray
> * TAP5-1970: Make it easier to create JSONObject and JSONArray instances
> * Add JSONObject.toMap()
> * Add JSONObject.in(String) to create (if needed) and return a nested 
> JSONObject
> There are 116 unit tests for the JSON module. A starting point would be to 
> overlay the open-json classes and see what tests fail.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TAP5-2575) Replace json.org-licensed classes with Apache-compatible versions

2017-03-06 Thread Martin Grigorov (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15897139#comment-15897139
 ] 

Martin Grigorov commented on TAP5-2575:
---

Hi,

You might be interested in this issue at OpenJson: 
https://github.com/tdunning/open-json/issues/11

> Replace json.org-licensed classes with Apache-compatible versions
> -
>
> Key: TAP5-2575
> URL: https://issues.apache.org/jira/browse/TAP5-2575
> Project: Tapestry 5
>  Issue Type: Task
>  Components: tapestry-json
>Affects Versions: 5.3.8, 5.4.1
>Reporter: Bob Harner
>
> Because of [license issues|https://www.apache.org/legal/resolved#json], we 
> need to replace all json.org-licensed classes with alternative classes having 
> an Apache-approved license. Apache legal has imposed a deadline of April 30, 
> 2017.
> Tapestry apparently includes 3 classes that are, starting in version 5.2, 
> "repackaged, improved (and tested) version of code originally from json.org." 
> These 3 all include D. Crockford's "The Software shall be used for Good, not 
> Evil" statement in the JSON license at the top.
> The 3 classes are:
> * JSONArray.java
> * JSONTokener.java
> * JSONObject.java
> Other Apache projects (including Wicket) have successfully switched to 
> https://github.com/tdunning/open-json, which contains versions of the above 3 
> classes that are purported to be mostly compatible with the current versions 
> from json.org. However, there have been changes to Tapestry's own version 
> since the original copy was made (May 2008 or possibly earlier), and those 
> changes would need to be re-applied. Some examples:
> * TAP5-1153: When in development mode, Tapestry should pretty-print JSON 
> content
> * TAP5-2209 Make JSONObject and JSONArray implement Serializable
> * Make JSONArray.from() not care about what values are stored in Iterable
> * Add a new constructor to JSONObject to make it easier to initalize a 
> JSONObjects key/value pairs (if all strings)
> * Change generics signature for JSONArray.putAll() and JSONObject.putAll()
> * TAP5-2098: Maintain JSONObject keys & values in the order they were added
> * Add a copy() method to JSONObject
> * Add JSONArray.toList()
> * Add JSONArray.putAll()
> * Added remove(int index) to JSONArray
> * TAP5-1970: Make it easier to create JSONObject and JSONArray instances
> * Add JSONObject.toMap()
> * Add JSONObject.in(String) to create (if needed) and return a nested 
> JSONObject
> There are 116 unit tests for the JSON module. A starting point would be to 
> overlay the open-json classes and see what tests fail.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TAP5-2575) Replace json.org-licensed classes with Apache-compatible versions

2017-03-06 Thread Jochen Kemnade (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15897115#comment-15897115
 ] 

Jochen Kemnade commented on TAP5-2575:
--

If we don't want to break any API, I guess we have to use the delegate pattern 
anyway, so we don't *need* to pick an implementation that is close to JSON.org. 
Maybe we should even consider using GSON.
However, I played around with {{open-json}} and it might work, I just don't 
like the fact that it uses the {{org.json}} package. I'm pretty sure that it's 
going to lead to classpath conflicts if we pulled that in.
Another issue is that the {{tapestry-json}} tests make lot of assertions about 
the error messages. If we want to keep these intact, that's probably going to 
be a lot of work.
Also, do we want/have to do this for 5.5 only or do we want/have to do a 5.4.2 
or even a 5.3.9?

> Replace json.org-licensed classes with Apache-compatible versions
> -
>
> Key: TAP5-2575
> URL: https://issues.apache.org/jira/browse/TAP5-2575
> Project: Tapestry 5
>  Issue Type: Task
>  Components: tapestry-json
>Affects Versions: 5.3.8, 5.4.1
>Reporter: Bob Harner
>
> Because of [license issues|https://www.apache.org/legal/resolved#json], we 
> need to replace all json.org-licensed classes with alternative classes having 
> an Apache-approved license. Apache legal has imposed a deadline of April 30, 
> 2017.
> Tapestry apparently includes 3 classes that are, starting in version 5.2, 
> "repackaged, improved (and tested) version of code originally from json.org." 
> These 3 all include D. Crockford's "The Software shall be used for Good, not 
> Evil" statement in the JSON license at the top.
> The 3 classes are:
> * JSONArray.java
> * JSONTokener.java
> * JSONObject.java
> Other Apache projects (including Wicket) have successfully switched to 
> https://github.com/tdunning/open-json, which contains versions of the above 3 
> classes that are purported to be mostly compatible with the current versions 
> from json.org. However, there have been changes to Tapestry's own version 
> since the original copy was made (May 2008 or possibly earlier), and those 
> changes would need to be re-applied. Some examples:
> * TAP5-1153: When in development mode, Tapestry should pretty-print JSON 
> content
> * TAP5-2209 Make JSONObject and JSONArray implement Serializable
> * Make JSONArray.from() not care about what values are stored in Iterable
> * Add a new constructor to JSONObject to make it easier to initalize a 
> JSONObjects key/value pairs (if all strings)
> * Change generics signature for JSONArray.putAll() and JSONObject.putAll()
> * TAP5-2098: Maintain JSONObject keys & values in the order they were added
> * Add a copy() method to JSONObject
> * Add JSONArray.toList()
> * Add JSONArray.putAll()
> * Added remove(int index) to JSONArray
> * TAP5-1970: Make it easier to create JSONObject and JSONArray instances
> * Add JSONObject.toMap()
> * Add JSONObject.in(String) to create (if needed) and return a nested 
> JSONObject
> There are 116 unit tests for the JSON module. A starting point would be to 
> overlay the open-json classes and see what tests fail.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)