You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Sascha Rogmann (JIRA)" <ji...@apache.org> on 2009/08/30 22:43:32 UTC
[jira] Created: (AXIS2-4480) AbstractJSONDataSource#getJSONString()
and buffering
AbstractJSONDataSource#getJSONString() and buffering
----------------------------------------------------
Key: AXIS2-4480
URL: https://issues.apache.org/jira/browse/AXIS2-4480
Project: Axis 2.0 (Axis2)
Issue Type: Improvement
Components: modules
Affects Versions: 1.5, 1.6
Reporter: Sascha Rogmann
Priority: Minor
The method getJSONString() in AbstractJSONDataSource makes
use of string concatenation instead of using a buffer (e.g. StringBuilder).
char temp = (char)jsonReader.read();
jsonString = "";
while ((int)temp != 65535) {
jsonString += temp;
temp = (char)jsonReader.read();
}
A buffer would be nice for printing large JSON-strings (e.g. with 40000 characters)
or a printing a lot of middle-sized JSON-strings.
char temp = (char)jsonReader.read();
StringBuilder sb = new StringBuilder(100); // TODO which initial capacity?
while ((int)temp != 65535) {
sb.append(temp);
temp = (char)jsonReader.read();
}
jsonString = sb.toString();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (AXIS2-4480)
AbstractJSONDataSource#getJSONString() and buffering
Posted by "Isuru Eranga Suriarachchi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-4480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Isuru Eranga Suriarachchi reassigned AXIS2-4480:
------------------------------------------------
Assignee: Isuru Eranga Suriarachchi
> AbstractJSONDataSource#getJSONString() and buffering
> ----------------------------------------------------
>
> Key: AXIS2-4480
> URL: https://issues.apache.org/jira/browse/AXIS2-4480
> Project: Axis 2.0 (Axis2)
> Issue Type: Improvement
> Components: modules
> Affects Versions: 1.6, 1.5
> Reporter: Sascha Rogmann
> Assignee: Isuru Eranga Suriarachchi
> Priority: Minor
>
> The method getJSONString() in AbstractJSONDataSource makes
> use of string concatenation instead of using a buffer (e.g. StringBuilder).
> char temp = (char)jsonReader.read();
> jsonString = "";
> while ((int)temp != 65535) {
> jsonString += temp;
> temp = (char)jsonReader.read();
> }
> A buffer would be nice for printing large JSON-strings (e.g. with 40000 characters)
> or a printing a lot of middle-sized JSON-strings.
> char temp = (char)jsonReader.read();
> StringBuilder sb = new StringBuilder(100); // TODO which initial capacity?
> while ((int)temp != 65535) {
> sb.append(temp);
> temp = (char)jsonReader.read();
> }
> jsonString = sb.toString();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (AXIS2-4480)
AbstractJSONDataSource#getJSONString() and buffering
Posted by "Isuru Eranga Suriarachchi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-4480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Isuru Eranga Suriarachchi resolved AXIS2-4480.
----------------------------------------------
Resolution: Fixed
Hi Sascha,
Fixed. Thanks for the suggestion.
~Isuru
> AbstractJSONDataSource#getJSONString() and buffering
> ----------------------------------------------------
>
> Key: AXIS2-4480
> URL: https://issues.apache.org/jira/browse/AXIS2-4480
> Project: Axis 2.0 (Axis2)
> Issue Type: Improvement
> Components: modules
> Affects Versions: 1.6, 1.5
> Reporter: Sascha Rogmann
> Assignee: Isuru Eranga Suriarachchi
> Priority: Minor
>
> The method getJSONString() in AbstractJSONDataSource makes
> use of string concatenation instead of using a buffer (e.g. StringBuilder).
> char temp = (char)jsonReader.read();
> jsonString = "";
> while ((int)temp != 65535) {
> jsonString += temp;
> temp = (char)jsonReader.read();
> }
> A buffer would be nice for printing large JSON-strings (e.g. with 40000 characters)
> or a printing a lot of middle-sized JSON-strings.
> char temp = (char)jsonReader.read();
> StringBuilder sb = new StringBuilder(100); // TODO which initial capacity?
> while ((int)temp != 65535) {
> sb.append(temp);
> temp = (char)jsonReader.read();
> }
> jsonString = sb.toString();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.