|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface JsonUtil
An API to convert back and forth with JSON.
| Method Summary | |
|---|---|
Iterable<SchemaEntry> |
schemasFromJson(String str)
Decode a string created by schemasToJson(Iterable) |
String |
schemasToJson(Iterable<SchemaEntry> allEntries)
Encode SchemaEntry objects into a String for use by
schemasFromJson(String)
The format is an array of objects containing id and schema fields, for example:
[{"id": "0", "schema": "schema1"}, {"id": "2", "schema": "schema2"}] |
Iterable<String> |
subjectNamesFromJson(String str)
Decode a string created by subjectsToJson(Iterable) |
String |
subjectsToJson(Iterable<Subject> subjects)
Encode Subjects into a String for use by
subjectNamesFromJson(String)
The format is an array of objects containing a name field, for example:
[{"name": "subject1"}, {"name": "subject2"}] |
| Method Detail |
|---|
String subjectsToJson(Iterable<Subject> subjects)
Subjects into a String for use by
subjectNamesFromJson(String)
The format is an array of objects containing a name field, for example:
[{"name": "subject1"}, {"name": "subject2"}]
subjects - the Subject objects to encode
Subject objects encoded as a StringIterable<String> subjectNamesFromJson(String str)
subjectsToJson(Iterable)
str - The String to decode
Iterable of SubjectString schemasToJson(Iterable<SchemaEntry> allEntries)
SchemaEntry objects into a String for use by
schemasFromJson(String)
The format is an array of objects containing id and schema fields, for example:
[{"id": "0", "schema": "schema1"}, {"id": "2", "schema": "schema2"}]
allEntries - the SchemaEntry objects to encode
SchemaEntry objects encoded as a StringIterable<SchemaEntry> schemasFromJson(String str)
schemasToJson(Iterable)
str - The String to decode
Iterable of SchemaEntry
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||