I am successfully using the json-framework to do GET HttpRequests. Does anyone have code to prepare a json object and do a POST HTTP Request? If so, can you please share some sample objective-c code. Thanks

link|flag
Hi Zap, did you figure this one out? Am looking to do the same thing but cant find an answer. – Cragly Jul 30 at 14:53

4 Answers

Take a look at this open source project hosted at google code.

Description:

This framework implements a strict JSON parser and generator in Objective-C.

Download the framework, embed it in your application, and import the JSON.h header. You're now ready to make your application speak JSON. The framework adds categories to existing Objective-C objects for a super-simple interface, and provides classes with more flexible APIs for added control.

link|flag

Try TwitterHelper.m in Stanford's CS 193P "Presence3Files.zip" package.

I would post the code directly but am unsure if that is cool, license-wise.

link|flag

I'm already using the framework you mentioned. Do you have any sample example code to do this?

link|flag

Thank you Kevin L. Is there a function or code you can share that builds the json object that is meant to be sent via POST? The UpdateStatus function just sends postData as an encoded string. Where does this code handle the {} and key:values for the JSON object to be posted? Do you have an example of code that builds that actual JSON object?

Zap

link|flag

Your Answer

 
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.