Merge "Fix typos in JSON documentation."
This commit is contained in:
@@ -31,8 +31,8 @@ import java.util.List;
|
||||
* Within JSON objects, name/value pairs are represented by a single token.
|
||||
*
|
||||
* <h3>Parsing JSON</h3>
|
||||
* To create a recursive descent parser your own JSON streams, first create an
|
||||
* entry point method that creates a {@code JsonReader}.
|
||||
* To create a recursive descent parser for your own JSON streams, first create
|
||||
* an entry point method that creates a {@code JsonReader}.
|
||||
*
|
||||
* <p>Next, create handler methods for each structure in your JSON text. You'll
|
||||
* need a method for each object type and for each array type.
|
||||
|
||||
@@ -70,7 +70,7 @@ import java.util.List;
|
||||
* This code encodes the above structure: <pre> {@code
|
||||
* public void writeJsonStream(OutputStream out, List<Message> messages) throws IOException {
|
||||
* JsonWriter writer = new JsonWriter(new OutputStreamWriter(out, "UTF-8"));
|
||||
* writer.setIndentSpaces(4);
|
||||
* writer.setIndent(" ");
|
||||
* writeMessagesArray(writer, messages);
|
||||
* writer.close();
|
||||
* }
|
||||
|
||||
Reference in New Issue
Block a user