/** Writes the specified JSON value, without quoting or escaping. */ public JsonWriter json (String name, String json) throws IOException { return name(name).json(json); }
/** Writes the specified JSON value, without quoting or escaping. */ public JsonWriter json (String name, String json) throws IOException { return name(name).json(json); }
public JsonWriter object (String name) throws IOException { return name(name).object(); }
public JsonWriter array (String name) throws IOException { return name(name).array(); }
public JsonWriter object (String name) throws IOException { return name(name).object(); }
public JsonWriter set (String name, Object value) throws IOException { return name(name).value(value); }
public JsonWriter array (String name) throws IOException { return name(name).array(); }
public JsonWriter set (String name, Object value) throws IOException { return name(name).value(value); }
/** @param knownType May be null if the type is unknown. */ public void writeObjectStart (String name, Class actualType, Class knownType) { try { writer.name(name); } catch (IOException ex) { throw new SerializationException(ex); } writeObjectStart(actualType, knownType); }
public void writeArrayStart (String name) { try { writer.name(name); writer.array(); } catch (IOException ex) { throw new SerializationException(ex); } }
public void writeObjectStart (String name) { try { writer.name(name); } catch (IOException ex) { throw new SerializationException(ex); } writeObjectStart(); }
public void writeArrayStart (String name) { try { writer.name(name); writer.array(); } catch (IOException ex) { throw new SerializationException(ex); } }
public void writeObjectStart (String name) { try { writer.name(name); } catch (IOException ex) { throw new SerializationException(ex); } writeObjectStart(); }
/** @param knownType May be null if the type is unknown. */ public void writeObjectStart (String name, Class actualType, Class knownType) { try { writer.name(name); } catch (IOException ex) { throw new SerializationException(ex); } writeObjectStart(actualType, knownType); }
/** Writes the value as a field on the current JSON object, writing the class of the object if it differs from the specified * known type. * @param value May be null. * @param knownType May be null if the type is unknown. * @see #writeValue(String, Object, Class, Class) */ public void writeValue (String name, Object value, Class knownType) { try { writer.name(name); } catch (IOException ex) { throw new SerializationException(ex); } writeValue(value, knownType, null); }
/** Writes the value as a field on the current JSON object, writing the class of the object if it differs from the specified * known type. The specified element type is used as the default type for collections. * @param value May be null. * @param knownType May be null if the type is unknown. * @param elementType May be null if the type is unknown. */ public void writeValue (String name, Object value, Class knownType, Class elementType) { try { writer.name(name); } catch (IOException ex) { throw new SerializationException(ex); } writeValue(value, knownType, elementType); }
/** Writes the value as a field on the current JSON object, writing the class of the object if it differs from the specified * known type. * @param value May be null. * @param knownType May be null if the type is unknown. * @see #writeValue(String, Object, Class, Class) */ public void writeValue (String name, Object value, Class knownType) { try { writer.name(name); } catch (IOException ex) { throw new SerializationException(ex); } writeValue(value, knownType, null); }
/** Writes the value as a field on the current JSON object, writing the class of the object if it differs from the specified * known type. The specified element type is used as the default type for collections. * @param value May be null. * @param knownType May be null if the type is unknown. * @param elementType May be null if the type is unknown. */ public void writeValue (String name, Object value, Class knownType, Class elementType) { try { writer.name(name); } catch (IOException ex) { throw new SerializationException(ex); } writeValue(value, knownType, elementType); }
/** Writes the value as a field on the current JSON object, without writing the actual class. * @param value May be null. * @see #writeValue(String, Object, Class, Class) */ public void writeValue (String name, Object value) { try { writer.name(name); } catch (IOException ex) { throw new SerializationException(ex); } if (value == null) writeValue(value, null, null); else writeValue(value, value.getClass(), null); }
/** Writes the value as a field on the current JSON object, without writing the actual class. * @param value May be null. * @see #writeValue(String, Object, Class, Class) */ public void writeValue (String name, Object value) { try { writer.name(name); } catch (IOException ex) { throw new SerializationException(ex); } if (value == null) writeValue(value, null, null); else writeValue(value, value.getClass(), null); }