How to send a JSON type string as a parameter?
Opened this issue · 4 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
1. Call a webservice with json type string as a parameter.
2. Some characters(like {,[,",: ) were encoded to URL type characters like %7B,
%5B when the parameter string is added to XML node.
3. Server returns error because parameter type is incorrect.
My question is,
1) Is there a way to send a JSON type string parameter when using wsdl2objc?
2) Is there a way to use XML CDATA section when using wsdl2objc? (to use json
type string in xml)
thanks.
Original issue reported on code.google.com by tsstc...@gmail.com
on 21 Feb 2013 at 11:35
GoogleCodeExporter commented
for example,
original JSON string is
{"name":"jone","mobile":"010-777-7777"
like this,
but encoded string is
{"name":"후승","mobile":"010-7777-7777&
Any solution?
Original comment by tsstc...@gmail.com
on 21 Feb 2013 at 2:35
GoogleCodeExporter commented
i have the same issue
..
Original comment by cokeco...@gmail.com
on 23 May 2013 at 8:36
GoogleCodeExporter commented
you can replace the " to "
- (NSString *)serializedFormUsingHeaderElements:(NSDictionary *)headerElements
bodyElements:(NSDictionary *)bodyElements
return [serializedForm stringByReplacingOccurrencesOfString:@""" withString:@"\""];
}
Original comment by cokeco...@gmail.com
on 23 May 2013 at 9:29
GoogleCodeExporter commented
can u give clear code how to replace it
and were does the "serializedForm" comes from ?
Original comment by anand...@gmail.com
on 26 Aug 2014 at 6:11