Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

calebd/CMDQueryStringSerialization

Repository files navigation

CMDQueryStringSerialization

Pod Version Pod Platform Pod License

Easily convert between dictionaries and query strings in iOS and OS X. The API is similar to NSJSONSerialization.

Usage

NSString *queryString = [CMDQueryStringSerialization queryStringWithDictionary:dictionary];

CMDQueryStringSerialization supports arrays encoded in one of the following three formats:

  • key=value1&key=value2
  • key[]=value1&key[]=value2
  • key=value1,value2

CMDQueryStringWritingOptions contains options that map to each of these formats, with CMDQueryStringWritingOptionArrayRepeatKeysWithBrackets being the default if no option is passed.

License

CMDQueryStringSerialization is released under the MIT License.