forked from loafle/openapi-generator-original
fix outdated link, improve docstring (#10870)
This commit is contained in:
parent
fcb28453e3
commit
e44c69dab1
@ -149,6 +149,13 @@ public class JSON {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure the parser to be liberal in what it accepts.
|
||||||
|
*
|
||||||
|
* @param lenientOnJson Set it to true to ignore some syntax errors
|
||||||
|
* @return JSON
|
||||||
|
* @see <a href="https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html">https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html</a>
|
||||||
|
*/
|
||||||
public JSON setLenientOnJson(boolean lenientOnJson) {
|
public JSON setLenientOnJson(boolean lenientOnJson) {
|
||||||
isLenientOnJson = lenientOnJson;
|
isLenientOnJson = lenientOnJson;
|
||||||
return this;
|
return this;
|
||||||
@ -177,7 +184,7 @@ public class JSON {
|
|||||||
try {
|
try {
|
||||||
if (isLenientOnJson) {
|
if (isLenientOnJson) {
|
||||||
JsonReader jsonReader = new JsonReader(new StringReader(body));
|
JsonReader jsonReader = new JsonReader(new StringReader(body));
|
||||||
// see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean)
|
// see https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html
|
||||||
jsonReader.setLenient(true);
|
jsonReader.setLenient(true);
|
||||||
return gson.fromJson(jsonReader, returnType);
|
return gson.fromJson(jsonReader, returnType);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -111,6 +111,13 @@ public class JSON {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure the parser to be liberal in what it accepts.
|
||||||
|
*
|
||||||
|
* @param lenientOnJson Set it to true to ignore some syntax errors
|
||||||
|
* @return JSON
|
||||||
|
* @see <a href="https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html">https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html</a>
|
||||||
|
*/
|
||||||
public JSON setLenientOnJson(boolean lenientOnJson) {
|
public JSON setLenientOnJson(boolean lenientOnJson) {
|
||||||
isLenientOnJson = lenientOnJson;
|
isLenientOnJson = lenientOnJson;
|
||||||
return this;
|
return this;
|
||||||
@ -139,7 +146,7 @@ public class JSON {
|
|||||||
try {
|
try {
|
||||||
if (isLenientOnJson) {
|
if (isLenientOnJson) {
|
||||||
JsonReader jsonReader = new JsonReader(new StringReader(body));
|
JsonReader jsonReader = new JsonReader(new StringReader(body));
|
||||||
// see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean)
|
// see https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html
|
||||||
jsonReader.setLenient(true);
|
jsonReader.setLenient(true);
|
||||||
return gson.fromJson(jsonReader, returnType);
|
return gson.fromJson(jsonReader, returnType);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -151,6 +151,13 @@ public class JSON {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure the parser to be liberal in what it accepts.
|
||||||
|
*
|
||||||
|
* @param lenientOnJson Set it to true to ignore some syntax errors
|
||||||
|
* @return JSON
|
||||||
|
* @see <a href="https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html">https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html</a>
|
||||||
|
*/
|
||||||
public JSON setLenientOnJson(boolean lenientOnJson) {
|
public JSON setLenientOnJson(boolean lenientOnJson) {
|
||||||
isLenientOnJson = lenientOnJson;
|
isLenientOnJson = lenientOnJson;
|
||||||
return this;
|
return this;
|
||||||
@ -179,7 +186,7 @@ public class JSON {
|
|||||||
try {
|
try {
|
||||||
if (isLenientOnJson) {
|
if (isLenientOnJson) {
|
||||||
JsonReader jsonReader = new JsonReader(new StringReader(body));
|
JsonReader jsonReader = new JsonReader(new StringReader(body));
|
||||||
// see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean)
|
// see https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html
|
||||||
jsonReader.setLenient(true);
|
jsonReader.setLenient(true);
|
||||||
return gson.fromJson(jsonReader, returnType);
|
return gson.fromJson(jsonReader, returnType);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -151,6 +151,13 @@ public class JSON {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure the parser to be liberal in what it accepts.
|
||||||
|
*
|
||||||
|
* @param lenientOnJson Set it to true to ignore some syntax errors
|
||||||
|
* @return JSON
|
||||||
|
* @see <a href="https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html">https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html</a>
|
||||||
|
*/
|
||||||
public JSON setLenientOnJson(boolean lenientOnJson) {
|
public JSON setLenientOnJson(boolean lenientOnJson) {
|
||||||
isLenientOnJson = lenientOnJson;
|
isLenientOnJson = lenientOnJson;
|
||||||
return this;
|
return this;
|
||||||
@ -179,7 +186,7 @@ public class JSON {
|
|||||||
try {
|
try {
|
||||||
if (isLenientOnJson) {
|
if (isLenientOnJson) {
|
||||||
JsonReader jsonReader = new JsonReader(new StringReader(body));
|
JsonReader jsonReader = new JsonReader(new StringReader(body));
|
||||||
// see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean)
|
// see https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html
|
||||||
jsonReader.setLenient(true);
|
jsonReader.setLenient(true);
|
||||||
return gson.fromJson(jsonReader, returnType);
|
return gson.fromJson(jsonReader, returnType);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -151,6 +151,13 @@ public class JSON {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure the parser to be liberal in what it accepts.
|
||||||
|
*
|
||||||
|
* @param lenientOnJson Set it to true to ignore some syntax errors
|
||||||
|
* @return JSON
|
||||||
|
* @see <a href="https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html">https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html</a>
|
||||||
|
*/
|
||||||
public JSON setLenientOnJson(boolean lenientOnJson) {
|
public JSON setLenientOnJson(boolean lenientOnJson) {
|
||||||
isLenientOnJson = lenientOnJson;
|
isLenientOnJson = lenientOnJson;
|
||||||
return this;
|
return this;
|
||||||
@ -179,7 +186,7 @@ public class JSON {
|
|||||||
try {
|
try {
|
||||||
if (isLenientOnJson) {
|
if (isLenientOnJson) {
|
||||||
JsonReader jsonReader = new JsonReader(new StringReader(body));
|
JsonReader jsonReader = new JsonReader(new StringReader(body));
|
||||||
// see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean)
|
// see https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html
|
||||||
jsonReader.setLenient(true);
|
jsonReader.setLenient(true);
|
||||||
return gson.fromJson(jsonReader, returnType);
|
return gson.fromJson(jsonReader, returnType);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -151,6 +151,13 @@ public class JSON {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure the parser to be liberal in what it accepts.
|
||||||
|
*
|
||||||
|
* @param lenientOnJson Set it to true to ignore some syntax errors
|
||||||
|
* @return JSON
|
||||||
|
* @see <a href="https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html">https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html</a>
|
||||||
|
*/
|
||||||
public JSON setLenientOnJson(boolean lenientOnJson) {
|
public JSON setLenientOnJson(boolean lenientOnJson) {
|
||||||
isLenientOnJson = lenientOnJson;
|
isLenientOnJson = lenientOnJson;
|
||||||
return this;
|
return this;
|
||||||
@ -179,7 +186,7 @@ public class JSON {
|
|||||||
try {
|
try {
|
||||||
if (isLenientOnJson) {
|
if (isLenientOnJson) {
|
||||||
JsonReader jsonReader = new JsonReader(new StringReader(body));
|
JsonReader jsonReader = new JsonReader(new StringReader(body));
|
||||||
// see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean)
|
// see https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html
|
||||||
jsonReader.setLenient(true);
|
jsonReader.setLenient(true);
|
||||||
return gson.fromJson(jsonReader, returnType);
|
return gson.fromJson(jsonReader, returnType);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user