You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,6 +92,8 @@ The following types (and any user defined types composed of them) are supported:
92
92
- Floating point numbers (float, double, and decimal)
93
93
- DateTimes & DateTimeOffsets
94
94
* See Configuration for further details
95
+
- TimeSpans
96
+
* See Configuration for further details
95
97
- Nullable types
96
98
- Enumerations
97
99
* Including \[Flags\]
@@ -107,11 +109,19 @@ declaration order). The [`DataMemberAttribute.Name` property](http://msdn.micro
107
109
108
110
Jil's `JSON.Serialize` and `JSON.Deserialize` methods take an optional `Options` parameter which controls:
109
111
110
-
- The format of DateTimes & DateTimeOffsets, one of
111
-
* NewtonsoftStyleMillisecondsSinceUnixEpoch, a string, ie. "\/Date(##...##)\/"
112
-
* MillisecondsSinceUnixEpoch, a number, which can be passed directly to [JavaScript's Date() constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)
113
-
* SecondsSinceUnixEpoch, a number, commonly refered to as [unix time](http://en.wikipedia.org/wiki/Unix_time)
114
-
* ISO8601, a string, ie. "2011-07-14T19:43:37Z"
112
+
- The format of DateTimes, DateTimeOffsets, and TimeSpans; one of
113
+
* NewtonsoftStyleMillisecondsSinceUnixEpoch, a string
114
+
- "\/Date(##...##)\/" for DateTimes
115
+
- "1.23:45:56.78" for TimeSpans
116
+
* MillisecondsSinceUnixEpoch, a number
117
+
- for DateTimes it can be passed directly to [JavaScript's Date() constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)
118
+
- for TimeSpans it's simply [TimeSpan.TotalMilliseconds](http://msdn.microsoft.com/en-us/library/system.timespan.totalmilliseconds%28v=vs.110%29.aspx)
119
+
* SecondsSinceUnixEpoch, a number
120
+
- for DateTimes this is commonly refered to as [unix time](http://en.wikipedia.org/wiki/Unix_time)
121
+
- for TimeSpans it's simply [TimeSpan.TotalSeconds](http://msdn.microsoft.com/en-us/library/system.timespan.totalseconds%28v=vs.110%29.aspx)
122
+
* ISO8601, a string
123
+
- for DateTimes, ie. "2011-07-14T19:43:37Z"
124
+
- for TimeSpans, ie. "P40DT11H10M9.4S"
115
125
- Whether or not to exclude null values when serializing dictionaries, and object members
116
126
- Whether or not to "pretty print" while serializing, which adds extra linebreaks and whitespace for presentation's sake
117
127
- Whether or not the serialized JSON will be used as JSONP (which requires slightly more work be done w.r.t. escaping)
0 commit comments