private static object ParseValue(string json, ref int index, ref bool success) { switch (PlayFabSimpleJson.LookAhead(json, index)) { case PlayFabSimpleJson.TokenType.CURLY_OPEN: return(PlayFabSimpleJson.ParseObject(json, ref index, ref success)); case PlayFabSimpleJson.TokenType.SQUARED_OPEN: return(PlayFabSimpleJson.ParseArray(json, ref index, ref success)); case PlayFabSimpleJson.TokenType.STRING: return(PlayFabSimpleJson.ParseString(json, ref index, ref success)); case PlayFabSimpleJson.TokenType.NUMBER: return(PlayFabSimpleJson.ParseNumber(json, ref index, ref success)); case PlayFabSimpleJson.TokenType.TRUE: PlayFabSimpleJson.NextToken(json, ref index); return(true); case PlayFabSimpleJson.TokenType.FALSE: PlayFabSimpleJson.NextToken(json, ref index); return(false); case PlayFabSimpleJson.TokenType.NULL: PlayFabSimpleJson.NextToken(json, ref index); return(null); } success = false; return(null); }