Put a value in the JSONArray, where the value will be a JSONObject which
is produced from a Map.

@param value A Map value.
@return this.
499039
public JSONArray element( Map value, JsonConfig jsonConfig ) {
      if( value instanceof JSONObject ){
         elements.add( value );
         return this;
      }else{
         return element( JSONObject.fromObject( value, jsonConfig ) );
      }
   }
1020049
public PactDslJsonArray stringValue(String value) {
      if (value == null) {
        body.put(JSONObject.NULL);
      } else {
        body.put(value);
      }
      return this;
    }
1268233
public synchronized void put(@NonNull String key, @Nullable String value) {
    if (value == null) {
      putNull(key);
      return;
    }

    try {
      this.content.put(key, value);
    } catch (JSONException je) {
      Log.e(TAG, "Failed json encode value: " + String.valueOf(value));
    }
  }
200070
public OtpErlangObject put(final OtpErlangObject key,
            final OtpErlangObject value) {
        return map.put(key, value);
    }
353395
public Object put(String key, JsonHash value) {
		if (value == null) {
			stateMap.put(key, Type.NULL);
		} else {
			stateMap.put(key, Type.HASH);
		}

		return super.put(key, value);
	}
1372948
@NonNull
    @Override
    public MutableArray addValue(Object value) {
        synchronized (lock) {
            internalArray.append(Fleece.toCBLObject(value));
            return this;
        }
    }
3487
public JSONArray element( double value ) {
      Double d = new Double( value );
      JSONUtils.testValidity( d );
      return element( d );
   }
88974
public void setAsObject(Object value) {
		clear();
		Map<String, Object> values = MapConverter.toMap(value);
		append(values);
	}
920073
public static JSONObject getObject(JSONValue value) {
        if (value == null)
            return null;
        if (!(value instanceof JSONObject))
            throw new JSONException(NOT_AN_OBJECT);
        return (JSONObject)value;
    }
538461
protected void setJsonValue(JsonObjectBuilder builder, T value) {
    // I don't like this - there should really be a way to construct a disconnected JSONValue...
    if (value instanceof Boolean) {
      builder.add("value", (Boolean) value);
    } else if (value instanceof Double) {
      builder.add("value", (Double) value);
    } else if (value instanceof Integer) {
      builder.add("value", (Integer) value);
    } else if (value instanceof Long) {
      builder.add("value", (Long) value);
    } else if (value instanceof BigInteger) {
      builder.add("value", (BigInteger) value);
    } else if (value instanceof BigDecimal) {
      builder.add("value", (BigDecimal) value);
    } else if (value == null) {
      builder.addNull("value");
    } else {
      builder.add("value", value.toString());
    }
  }
897086
public PactDslJsonArray equalsTo(Object value) {
    body.put(value);
    matchers.addRule(rootPath + appendArrayIndex(0), EqualsMatcher.INSTANCE);
    return this;
  }
1245225
public MapComposer<PARENT> put(String fieldName, boolean value)
    {
        _map.put(fieldName, value ? Boolean.TRUE : Boolean.FALSE);
        return this;
    }
702793
public JSONObject put(Enum<?> key, boolean value) throws JSONException {
		return put(key.name(), value);
	}
518219
public static JSONArray getArray(JSONValue value) {
        if (value == null)
            return null;
        if (!(value instanceof JSONArray))
            throw new JSONException(NOT_AN_ARRAY);
        return (JSONArray)value;
    }
815808
public Object put(Object key, Object value) {
        mCacheMap.put(key, value);
        return mBackingMap.put(key, value);
    }
266391
public JsonWriter value(long value) throws IOException {
        beforeValue(false);
        out.write(Long.toString(value));
        return this;
    }
827655
public boolean add(JsonArray value) {
		if (value == null) {
			stateList.add(Type.NULL);
		} else {
			stateList.add(Type.ARRAY);
		}

		return super.add(value);
	}