From a361f2ab203da8efb83387d3840a93d5c464d5f9 Mon Sep 17 00:00:00 2001 From: Alanscut Date: Sat, 19 Oct 2019 16:47:55 +0800 Subject: [PATCH 01/54] fix typos and link to the right url --- subprojects/guide/src/docs/asciidoc/groovy.adoc | 4 ++-- subprojects/guide/src/docs/asciidoc/introduction.adoc | 2 +- subprojects/guide/src/docs/asciidoc/usage.adoc | 10 +++++----- subprojects/json-lib-core/src/site/xdoc/features.xml | 2 +- subprojects/json-lib-core/src/site/xdoc/groovy.xml | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/subprojects/guide/src/docs/asciidoc/groovy.adoc b/subprojects/guide/src/docs/asciidoc/groovy.adoc index 8386b374..0729ab7a 100644 --- a/subprojects/guide/src/docs/asciidoc/groovy.adoc +++ b/subprojects/guide/src/docs/asciidoc/groovy.adoc @@ -12,7 +12,7 @@ in the same manner as you do now with POJOs. There are other features as well: [source,groovy] ---- -def fromList = [1,true,'json'] as JSONarray +def fromList = [1,true,'json'] as JSONArray def fromMap = [integer:1, bool: true] as JSONObject def strAsJson1 = "{integer:1, bool: true}" as JSON def strAsJson2 = "[1,2,3]" as JSON @@ -31,7 +31,7 @@ def strAsFunc = "function(param){ this.param = param; }" as JSONFunction ll create a JSONArray because it is a List). ** Any other type will be discarded, the object will not be affected nor an exception will be thrown. -* JSONObject and JSONarray implement java.util.Comparable, which enables the use of +* JSONObject and JSONArray implement java.util.Comparable, which enables the use of the comparison operators with them (including the spaceship operator). * JSONObject implements java.util.Map and JSONArray implements java.util.List, anything you can do with Maps and List can be done with JSONObject and JSONArray. diff --git a/subprojects/guide/src/docs/asciidoc/introduction.adoc b/subprojects/guide/src/docs/asciidoc/introduction.adoc index 5417ef12..e990a177 100644 --- a/subprojects/guide/src/docs/asciidoc/introduction.adoc +++ b/subprojects/guide/src/docs/asciidoc/introduction.adoc @@ -70,4 +70,4 @@ and many others. These properties make JSON an ideal data-interchange language. -NOTE: Documentation for older releases can be found at link:json-lib.sourceforge.net/[] +NOTE: Documentation for older releases can be found at link:http://json-lib.sourceforge.net/[] diff --git a/subprojects/guide/src/docs/asciidoc/usage.adoc b/subprojects/guide/src/docs/asciidoc/usage.adoc index 7215bbff..cd158c29 100644 --- a/subprojects/guide/src/docs/asciidoc/usage.adoc +++ b/subprojects/guide/src/docs/asciidoc/usage.adoc @@ -79,7 +79,7 @@ class MyBean{ private String func1 = "function(i){ return this.options[i]; }"; private JSONFunction func2 = new JSONFunction(new String[]{"i"},"return this.options[i];"); -// getters & setters +// getters, setters ... } @@ -153,12 +153,12 @@ Example: ---- class MyBean{ private List data; - // getters & setters + // getters, setters } class Person{ private String name; - // getters & setters + // getters, setters } ... @@ -206,7 +206,7 @@ with '@' will be treated as an attribute, any property named '#text' will be tre Please review the javadoc for XMLSerializer to know more about the configurable options. -[cols="l,l"] +[cols="1,1"] |=== |*Code* | *XML output* @@ -246,7 +246,7 @@ JSONFunction needs an additional parameter that specifies that function's params All xml attributes will have the prefix '@' and text nodes will have the property name '#text'. XMLSerializer supports the rules outlined at http://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html[Converting Between XML and JSON] -[cols="l,l"] +[cols="1,1"] |=== |*XML input* | *Code* diff --git a/subprojects/json-lib-core/src/site/xdoc/features.xml b/subprojects/json-lib-core/src/site/xdoc/features.xml index 1cfc5b7c..b4129220 100644 --- a/subprojects/json-lib-core/src/site/xdoc/features.xml +++ b/subprojects/json-lib-core/src/site/xdoc/features.xml @@ -27,7 +27,7 @@
  • skip modifying map keys when transforming form JSON to Java if the key is not a valid JavaIdentifier
  • register your own JavaIdentifierTransformer strategy
  • plugin your own strategy for setting properties into a bean when transforming from JSON to Java thanks to PropertySetStrategy
  • -
  • publish events when building a JSONObject or JSONarray. The available events are: +
  • publish events when building a JSONObject or JSONArray. The available events are: