From 7401e82b9b079cc59f2968046d1020bde8dba10d Mon Sep 17 00:00:00 2001 From: Jesse Wilson Date: Thu, 9 Dec 2021 06:07:44 -0500 Subject: [PATCH] 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:

, compared to implicit preceding heading:

*

Encoding JSON

^ /home/runner/work/moshi/moshi/moshi/src/main/java/com/squareup/moshi/JsonReader.java:40: error: heading used out of sequence:

, compared to implicit preceding heading:

*

Parsing JSON

^ --- .../src/main/java/com/squareup/moshi/ClassJsonAdapter.java | 2 +- moshi/src/main/java/com/squareup/moshi/JsonReader.java | 6 +++--- moshi/src/main/java/com/squareup/moshi/JsonWriter.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/moshi/src/main/java/com/squareup/moshi/ClassJsonAdapter.java b/moshi/src/main/java/com/squareup/moshi/ClassJsonAdapter.java index 50e7d46..73b65e3 100644 --- a/moshi/src/main/java/com/squareup/moshi/ClassJsonAdapter.java +++ b/moshi/src/main/java/com/squareup/moshi/ClassJsonAdapter.java @@ -36,7 +36,7 @@ import javax.annotation.Nullable; /** * Emits a regular class as a JSON object by mapping Java fields to JSON object properties. * - *

Platform Types

+ *

Platform Types

* * 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: diff --git a/moshi/src/main/java/com/squareup/moshi/JsonReader.java b/moshi/src/main/java/com/squareup/moshi/JsonReader.java index 5edabcc..2546582 100644 --- a/moshi/src/main/java/com/squareup/moshi/JsonReader.java +++ b/moshi/src/main/java/com/squareup/moshi/JsonReader.java @@ -37,7 +37,7 @@ import okio.ByteString; * 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. * - *

Parsing JSON

+ *

Parsing JSON

* * To create a recursive descent parser for your own JSON streams, first create an entry point * method that creates a {@code JsonReader}. @@ -65,7 +65,7 @@ import okio.ByteString; *

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()}. * - *

Example

+ *

Example

* * Suppose we'd like to parse a stream of messages such as the following: * @@ -171,7 +171,7 @@ import okio.ByteString; * } * } * - *

Number Handling

+ *

Number Handling

* * 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 diff --git a/moshi/src/main/java/com/squareup/moshi/JsonWriter.java b/moshi/src/main/java/com/squareup/moshi/JsonWriter.java index 024900e..05d1952 100644 --- a/moshi/src/main/java/com/squareup/moshi/JsonWriter.java +++ b/moshi/src/main/java/com/squareup/moshi/JsonWriter.java @@ -37,7 +37,7 @@ import okio.BufferedSource; * 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. * - *

Encoding JSON

+ *

Encoding JSON

* * 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, @@ -53,7 +53,7 @@ import okio.BufferedSource; * arrays. Finally close the object using {@link #endObject()}. * * - *

Example

+ *

Example

* * Suppose we'd like to encode a stream of messages such as the following: *