JSONObject.Bake C# (CSharp) Method

Bake() public method

public Bake ( ) : void
return void
	public void Bake()
	{
		if (type != Type.BAKED)
		{
			str = Print();
			type = Type.BAKED;
		}
	}
	public IEnumerable BakeAsync()

Usage Example

Example #1
0
 public void AuthorizeUser(Action <JSONObject> onComplete)
 {
     if (_token == null)
     {
         _token = GetToken();
     }
     if (_token == "")
     {
         String     response     = "{\"error\": \"no token found\"}";
         JSONObject jsonResponse = new JSONObject(response);
         jsonResponse.Bake();
         onComplete(jsonResponse);
         return;
     }
     if (_userId == null)
     {
         _userId = GetUserid();
     }
     if (_userId == "")
     {
         String     response     = "{\"error\": \"no userid found\"}";
         JSONObject jsonResponse = new JSONObject(response);
         jsonResponse.Bake();
         onComplete(jsonResponse);
         return;
     }
     POST("user/authorize", new Dictionary <string, string> {
         { "token", _token }, { "uuid", _userId }
     }, onComplete);
 }
All Usage Examples Of JSONObject::Bake