# Class JSONWriter.ObjectBuilder

java.lang.Object
com.codename1.io.JSONWriter.ObjectBuilder

Enclosing class:
  `JSONWriter`

public static final class JSONWriter.ObjectBuilder extends java.lang.Object
Fluent builder for `{ "k": v, ... }`. Implements `toJson()` to emit the encoded string and exposes the backing `Map` via `toMap()` for callers that need to embed the builder into a larger structure.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `JSONWriter.ObjectBuilder`
  `put(String key, java.lang.Object value)`
  `String`
  `toJson()`
  `Map<String, java.lang.Object>`
  `toMap()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### put

    public JSONWriter.ObjectBuilder put(String key, java.lang.Object value)

  - ### toMap

    public Map<String, java.lang.Object> toMap()

  - ### toJson

    public String toJson()

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `java.lang.Object`