JSONObject.SetField C# (CSharp) Method

SetField() public method

public SetField ( string name, JSONObject, obj ) : void
name string
obj JSONObject,
return void
	public void SetField(string name, JSONObject obj)
	{
		if (HasField(name))
		{
			list.Remove(this[name]);
			keys.Remove(name);
		}
		AddField(name, obj);
	}
	public void RemoveField(string name)

Same methods

JSONObject::SetField ( string name, bool val ) : void
JSONObject::SetField ( string name, float val ) : void
JSONObject::SetField ( string name, int val ) : void

Usage Example

Example #1
0
 private void SetVec2(Vector2 value)
 {
     JSONObject vecJson = new JSONObject();
     vecJson.SetField("x",value.x);
     vecJson.SetField("y",value.y);
     VariableManager.JsonRecord.SetField(ID,vecJson);
 }
All Usage Examples Of JSONObject::SetField