code: private static void writeValue(Object value, JsonWriter writer) throws IOException {
      if (value == null) {
        writer.nullValue();
      } else if (value instanceof Number) {
        writer.value((Number) value);
      } else if (value instanceof Boolean) {
        writer.value((Boolean) value);
      } else if (value instanceof List) {
        listToWriter((List) value, writer);
      } else if (value instanceof Map) {
        mapToWriter((Map) value, writer);
      } else if (value.getClass().isArray()) {
        arrayToWriter(value, writer);
      } else {
        writer.value(String.valueOf(value));
      }
    }
docs: Writes the given {@link Object} to the {@link JsonWriter}.
  
  @throws IOException