Comments (3)
The notificationContent
key has a string of JSON with it? Can you provide an example of what it looks like? JSONJoy uses the builtin NSJSONSerialization class, so if that parses it as an object and not a string, it should behave properly.
from jsonjoy-swift.
Here is a sample of NotificationContent
:
"NotificationContent":"{\"Subject\":{\"SubjectTitle\":\"Physical Development\",\"ExamMark\":null,\"ClassTimeFrom\":null,\"ClassTimeTo\":null,\"SubjectID\":null,\"MaxGrade\":0}
And this is the JSON Object that I parse using JSONDecoder it includes NotificationContent
:
{"AppUserId":"0000000-0000-0000-0000-000000000000","ContentToDisplay":null,"CreationDate":"\/Date(1436337714830+0300)\/","ExiprationDate":"\/Date(1437201714830+0300)\/","IsSeenByUser":false,"NotificationContent":"{\"Subject\":{\"SubjectTitle\":\"Language and Literacy Development\",\"ExamMark\":null,\"ClassTimeFrom\":null,\"ClassTimeTo\":null,\"SubjectID\":null,\"MaxGrade\":0},\"Homework\":{\"Title\":\"Quiz\",\"CreationDate\":\"08\/07\/2015 9:41:54 AM\",\"Description\":\"Quiz in chapter 10, pages 145 -> 200\"},\"TeacherNotes\":{\"TeacherName\":\"\",\"CreationDate\":\"08\/07\/2015 9:41:54 AM\",\"Content\":\"None\"},\"DueDate\":\"09\/07\/2015\",\"TimeFrom\":\"8:00 AM\",\"TimeTo\":\"9:30 AM\",\"child\":{\"FullName\":\"شهاب\",\"PersonID\":\"00000000-0000-0000-0000-000000000000\",\"SISNumber\":\"8136-1816103\"},\"Title\":\"Quiz\"}","NotificationID":"0000000-0000-0000-0000-000000000000","NotificationType":10,"SISUserID":"0000000-0000-0000-0000-000000000000","SISUserNumber":"0000-0000"}
By the way a side question, in my pod file I chose the platform to be IOS 7, am I good to go for both IOS 7 & 8? or are there any changes I need to do for both JSONJoy and SwiftHTTP?
from jsonjoy-swift.
Alright, yeah. I don't think NSJSONSerialization parses a JSON string with JSON. You will probably have to run that through the parser again (or a JSONDecoder), as JSONJoy uses the standard NSJSONSerialization API to do JSON parsing.
You should be able to set it to iOS7 for both. The code isn't any different for either target version. The only issue is iOS 7 doesn't support Swift dynamic frameworks. See this for more info:
from jsonjoy-swift.
Related Issues (20)
- Gracefully handling JSON's null HOT 1
- Handling dynamic and meaningful keys HOT 5
- Example code issues HOT 1
- Swift 3 support HOT 3
- Array of Dictionary values
- Bool parsing broken on XCode 8.1 HOT 2
- Ambiguous use of 'getString()' HOT 3
- Handling optional array HOT 5
- add name of property in the exception wrongType HOT 2
- 'JSONDecoder' has no member string HOT 2
- Parse String Array Issue HOT 1
- example of Nested Array in object within another object HOT 2
- how to do ? object to jsonstr HOT 1
- Not working with Swift4 HOT 7
- Update to xCode 9 and 'JSONDecoder' is ambiguous for type lookup in this context HOT 2
- Swift 4 issue with HOT 4
- Swift4 compile error HOT 3
- Consider merging with quicktype? HOT 1
- Issue with Swift 4 "JSONLoader' is not a member type of 'JSONJoy"
- Array of Object Not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsonjoy-swift.