https://github.com/foveacentral/jsonobject
Lightweight JSON marshaling for Objective-C
https://github.com/foveacentral/jsonobject
json objective-c
Last synced: 2 months ago
JSON representation
Lightweight JSON marshaling for Objective-C
- Host: GitHub
- URL: https://github.com/foveacentral/jsonobject
- Owner: FoveaCentral
- License: mit
- Created: 2013-06-27T21:12:46.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-06-29T05:15:17.000Z (about 13 years ago)
- Last Synced: 2025-06-14T08:38:45.147Z (about 1 year ago)
- Topics: json, objective-c
- Language: Objective-C
- Homepage:
- Size: 172 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
JSONObject
==========
Lightweight JSON marshaling for Objective-C, with Ruby-like string inflections as a bonus.
## Installation
1. Install [CocoaPods](http://docs.cocoapods.org/guides/installing_cocoapods.html).
2. Add the Podfile to your project root:
```ruby
pod 'JSONObject'
```
3. In your project root, install the pod by entering:
```
pod install
```
4. Open the ```.xcworkspace``` file in your project directory. From now on, use this workspace instead of the ```.xcodeproj``` file.
5. Add JSONObject to your model object's class header:
```objective-c
#import
```
## Usage
* To convert the model object to JSON wrapped in the key name "object":
```objective-c
NSData *json = [myObject toJSON:@"object"];
```
This JSON data stream is suitable for use in a JSON request.