Interface JsonBuilder
-
- All Known Implementing Classes:
MapJsonBuilder,StringJsonBuilder
public interface JsonBuilderBuilds JSON objects- Author:
- Michel Kraemer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JsonBuilderadd(java.lang.String name, java.lang.Object o)Adds a property to the object to buildjava.lang.Objectbuild()Builds the JSON objectjava.lang.ObjecttoJson(java.lang.Object o)Converts the given object to a JSON object
-
-
-
Method Detail
-
add
JsonBuilder add(java.lang.String name, java.lang.Object o)
Adds a property to the object to build- Parameters:
name- the property's nameo- the property's value- Returns:
- the
JsonBuilder
-
build
java.lang.Object build()
Builds the JSON object- Returns:
- the object
-
toJson
java.lang.Object toJson(java.lang.Object o)
Converts the given object to a JSON object- Parameters:
o- the object to convert- Returns:
- the JSON object
-
-