Page 1 of 1

Parse.com | Send number in request as number type and not string type

Posted: Sat Aug 04, 2012 1:40 pm
by Sumith Rajagopalan

Trying to use parse.com.
Tiggzi: Input field which accept only numbers
Parse.com: Class with field type set to number

When I test the API by entering a number in the number field, I get the response
Server response:
{
"error": "invalid type for key balance, expected number, but got string",
"code": 111
}

How do I make sure that the number value entered is sent as number and not as a string?


Parse.com | Send number in request as number type and not string type

Posted: Sun Aug 05, 2012 12:13 am
by maxkatz

Parse.com | Send number in request as number type and not string type

Posted: Sun Aug 05, 2012 4:02 am
by Sumith Rajagopalan

That helps in execution. Thanks.

How do I test the API? I cannot enter javascript in the test window.


Parse.com | Send number in request as number type and not string type

Posted: Sun Aug 05, 2012 5:00 am
by maxkatz

It's not possible to do this when testing, but it works when you run the service. We will add the ability to specify data types in our new HTML5 app builder in the fall.


Parse.com | Send number in request as number type and not string type

Posted: Sun Aug 05, 2012 5:15 am
by Sumith Rajagopalan

Ok. Thanks