code: public JsonWriter valueObject(@Nullable Object value) {
  
      try {
        if (value == null) {
          stream.nullValue();
          return this;
        }
        valueNonNullObject(value);
        return this;
      } catch (IllegalArgumentException e) {
        throw e;
      } catch (Exception e) {
        throw rethrow(e);
      }
    }
docs: Encodes an object that can be a :
  <ul>
  <li>primitive types: String, Number, Boolean</li>
  <li>java.util.Date: encoded as datetime (see {@link #valueDateTime(java.util.Date)}</li>
  <li>{@code Map<Object, Object>}. Method toString is called for the key.</li>
  <li>Iterable</li>
  </ul>
  
  @throws org.sonar.api.utils.text.WriterException on any failure