are there some commonly used utils or standard way to parse http-forms into key-value pairs e.g. into NSDictionary?
thanks for any help
are there some commonly used utils or standard way to parse http-forms into key-value pairs e.g. into NSDictionary?
thanks for any help
I can't find any light-weight solution, but where's good Objective-C library called GCDWebServer
This is how I use it:
in Podfile
pod "GCDWebServer"
in my application
#import "GCDWebServerFunctions.h"
NSDictionary *dict = GCDWebServerParseURLEncodedForm(bodyString);
Yes. NSJSONSerialization. It's exactly what you're looking for.
UPDATE:
If you need to parse application/x-www-form-urlencoded data, this answer is best. You may need to first convert the NSData to a string.