mirror of
https://github.com/fankes/moshi.git
synced 2025-10-19 16:09:21 +08:00
Submit to Javadoc's draconion heading ordering rule (#1452)
Whoever thought this was a good idea is wrong. > Task :moshi:javadoc /home/runner/work/moshi/moshi/moshi/src/main/java/com/squareup/moshi/JsonWriter.java:40: error: heading used out of sequence: <H3>, compared to implicit preceding heading: <H1> * <h3>Encoding JSON</h3> ^ /home/runner/work/moshi/moshi/moshi/src/main/java/com/squareup/moshi/JsonReader.java:40: error: heading used out of sequence: <H3>, compared to implicit preceding heading: <H1> * <h3>Parsing JSON</h3> ^
This commit is contained in:
@@ -36,7 +36,7 @@ import javax.annotation.Nullable;
|
|||||||
/**
|
/**
|
||||||
* Emits a regular class as a JSON object by mapping Java fields to JSON object properties.
|
* Emits a regular class as a JSON object by mapping Java fields to JSON object properties.
|
||||||
*
|
*
|
||||||
* <h3>Platform Types</h3>
|
* <h1>Platform Types</h1>
|
||||||
*
|
*
|
||||||
* Fields from platform classes are omitted from both serialization and deserialization unless they
|
* Fields from platform classes are omitted from both serialization and deserialization unless they
|
||||||
* are either public or protected. This includes the following packages and their subpackages:
|
* are either public or protected. This includes the following packages and their subpackages:
|
||||||
|
@@ -37,7 +37,7 @@ import okio.ByteString;
|
|||||||
* depth-first order, the same order that they appear in the JSON document. Within JSON objects,
|
* depth-first order, the same order that they appear in the JSON document. Within JSON objects,
|
||||||
* name/value pairs are represented by a single token.
|
* name/value pairs are represented by a single token.
|
||||||
*
|
*
|
||||||
* <h3>Parsing JSON</h3>
|
* <h1>Parsing JSON</h1>
|
||||||
*
|
*
|
||||||
* To create a recursive descent parser for your own JSON streams, first create an entry point
|
* To create a recursive descent parser for your own JSON streams, first create an entry point
|
||||||
* method that creates a {@code JsonReader}.
|
* method that creates a {@code JsonReader}.
|
||||||
@@ -65,7 +65,7 @@ import okio.ByteString;
|
|||||||
* <p>If a value may be null, you should first check using {@link #peek()}. Null literals can be
|
* <p>If a value may be null, you should first check using {@link #peek()}. Null literals can be
|
||||||
* consumed using either {@link #nextNull()} or {@link #skipValue()}.
|
* consumed using either {@link #nextNull()} or {@link #skipValue()}.
|
||||||
*
|
*
|
||||||
* <h3>Example</h3>
|
* <h1>Example</h1>
|
||||||
*
|
*
|
||||||
* Suppose we'd like to parse a stream of messages such as the following:
|
* Suppose we'd like to parse a stream of messages such as the following:
|
||||||
*
|
*
|
||||||
@@ -171,7 +171,7 @@ import okio.ByteString;
|
|||||||
* }
|
* }
|
||||||
* }</pre>
|
* }</pre>
|
||||||
*
|
*
|
||||||
* <h3>Number Handling</h3>
|
* <h1>Number Handling</h1>
|
||||||
*
|
*
|
||||||
* This reader permits numeric values to be read as strings and string values to be read as numbers.
|
* This reader permits numeric values to be read as strings and string values to be read as numbers.
|
||||||
* For example, both elements of the JSON array {@code [1, "1"]} may be read using either {@link
|
* For example, both elements of the JSON array {@code [1, "1"]} may be read using either {@link
|
||||||
|
@@ -37,7 +37,7 @@ import okio.BufferedSource;
|
|||||||
* stream, one token at a time. The stream includes both literal values (strings, numbers, booleans
|
* stream, one token at a time. The stream includes both literal values (strings, numbers, booleans
|
||||||
* and nulls) as well as the begin and end delimiters of objects and arrays.
|
* and nulls) as well as the begin and end delimiters of objects and arrays.
|
||||||
*
|
*
|
||||||
* <h3>Encoding JSON</h3>
|
* <h1>Encoding JSON</h1>
|
||||||
*
|
*
|
||||||
* To encode your data as JSON, create a new {@code JsonWriter}. Each JSON document must contain one
|
* To encode your data as JSON, create a new {@code JsonWriter}. Each JSON document must contain one
|
||||||
* top-level array or object. Call methods on the writer as you walk the structure's contents,
|
* top-level array or object. Call methods on the writer as you walk the structure's contents,
|
||||||
@@ -53,7 +53,7 @@ import okio.BufferedSource;
|
|||||||
* arrays. Finally close the object using {@link #endObject()}.
|
* arrays. Finally close the object using {@link #endObject()}.
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* <h3>Example</h3>
|
* <h1>Example</h1>
|
||||||
*
|
*
|
||||||
* Suppose we'd like to encode a stream of messages such as the following:
|
* Suppose we'd like to encode a stream of messages such as the following:
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user