Add serialization support for generic IDictionary objects
[mono.git] / mcs / class / System.ServiceModel.Web / System.Runtime.Serialization.Json / ChangeLog
1 2010-07-27  Andreia Gaita  <avidigal@novell.com>
2
3         * JsonSerializationReader.cs, JsonSerializationWriter.cs:
4           Add a special case for IDictionary, since KeyValuePair objects
5           have private setters and can't be processed via the normal
6           object code path.
7
8 2010-07-06  Atsushi Enomoto  <atsushi@ximian.com>
9
10         * TypeMap.cs :
11           Do not try to add static members as serialization targets.
12           Support OnDeserializing and OnDeserialized. Fixed bug #615800.
13
14 2010-07-06  Atsushi Enomoto  <atsushi@ximian.com>
15
16         * JsonSerializationWriter.cs : it cannot serialize DateTime in
17           double, which causes crash in deserializer.
18
19 2010-07-06  Atsushi Enomoto  <atsushi@ximian.com>
20
21         * TypeMap.cs : when an object is null, return null, not just an 
22           uninitialized object.
23
24 2010-07-06  Atsushi Enomoto  <atsushi@ximian.com>
25
26         * DataContractJsonSerializer_2_1.cs : add extra methods for
27           Sys.SM.Web.Extensions build.
28
29 2010-07-06  Atsushi Enomoto  <atsushi@ximian.com>
30
31         * JsonReader.cs : do not keep Attribute state once Read() is called.
32
33 2010-04-24  Atsushi Enomoto  <atsushi@ximian.com>
34
35         * JsonSerializationReader.cs : use List<T> if the contract member
36           type is interface.
37
38 2010-03-16  Jb Evain  <jbevain@novell.com>
39
40         * DataContractJsonSerializer.cs: use MOONLIGHT symbol to
41         disambiguate MonoTouch and Moonlight code.
42
43 2010-03-13  Kornél Pál  <kornelpal@gmail.com>
44
45         * JavaScriptReader.cs: Deserialize "false" correctly.
46           Fixed bug #586712.
47
48 2010-03-10  Atsushi Enomoto  <atsushi@ximian.com>
49
50         * JavaScriptReader.cs : moved from Sys.Json/JsonReader.cs.
51
52 2010-03-10  Atsushi Enomoto  <atsushi@ximian.com>
53
54         * JavaScriptObjectDeserializer.cs : new internal file, which is
55           used by System.Json (for moonlight compatibility).
56
57 2010-03-09  Atsushi Enomoto  <atsushi@ximian.com>
58
59         * JsonSerializationWriter.cs, JsonSerializationReader.cs,
60           JsonWriter.cs : Fix DateTime serialization and "\/" string escape
61           issues. Fixed bug #586169.
62
63 2010-02-24  Atsushi Enomoto  <atsushi@ximian.com>
64
65         * JsonWriter.cs : write NaN, INF, -INF as JSON string, not JSON number.
66           Fixed bug #573691.
67
68 2010-01-27  Atsushi Enomoto  <atsushi@ximian.com>
69
70         * DataContractJsonSerializer.cs : KnownTypes does not include root
71           type. Fixed bug #573689.
72
73 2010-01-27  Atsushi Enomoto  <atsushi@ximian.com>
74
75         * JsonSerializationReader.cs : oops, wrong fix, should consume the
76           reader.
77
78 2010-01-27  Atsushi Enomoto  <atsushi@ximian.com>
79
80         * JsonSerializationReader.cs : "null" for string should be read as
81           null, not String.Empty. Fixed bug #573690.
82
83 2010-01-26  Sebastien Pouliot  <sebastien@ximian.com>
84
85         * DataContractJsonSerializer_2_1.cs: Don't hide [Field|Method]
86         AccessException inside a SerializationException but in a 
87         SecurityException.
88
89 2010-01-25  Sebastien Pouliot  <sebastien@ximian.com>
90
91         * DataContractJsonSerializer_2_1.cs: New. Simpler version for 
92         Moonlight since it does not inherit from the same base type nor
93         does it overrides any base methods.
94
95 2010-01-08  Atsushi Enomoto  <atsushi@ximian.com>
96
97         * TypeMap.cs : forward port r145077 (see change line for 2009-10-29).
98
99 2009-12-14  Atsushi Enomoto  <atsushi@ximian.com>
100
101         * TypeMap.cs : handle [Serializable] objects such as KeyValuePair<,>
102           like we do in 2.0. Removed previous workarounds. (Do not serialize
103           and deserialize nonpublic members in "default" mappings.)
104
105 2009-12-11  Chris Toshok  <toshok@ximian.com>
106
107         * TypeMap.cs (CreateDefaultTypeMap): only include non-public
108         property info when dealing with KeyValuePair<,>.  This is *not*
109         the way MS handles it, but we emulate things much better with this
110         hack.
111
112 2009-12-11  Atsushi Enomoto  <atsushi@ximian.com>
113
114         * JsonReader.cs : e- and e+ was resulting in wrong parse error.
115           This should fix part of bug #531904.
116
117 2009-12-08  Chris Toshok  <toshok@ximian.com>
118
119         * JsonSerializationReader.cs (DeserializeGenericCollection): in
120         the 2.1 case we still need to convert the List<> to an array.
121
122 2009-12-07  Chris Toshok  <toshok@ximian.com>
123
124         * JsonReaderWriterFactory.cs (CreateJsonReader): pass null for the
125         encoding parameter instead of calling Detect.  The jsonreader's
126         PushbackReader will autodetect.
127         (Detect): remove.  a BufferedStream created from an unseekable
128         stream is itself unseekable, which makes it just as useless.  This
129         breaks netflix's isostore file parsing.
130
131         * JsonReader.cs (PushbackReader): add a ctor which doesn't take an
132         encoding, for the autodetecting reader case.  for this ctor, pass
133         true to StreamReader's ctor for detectEncodingFromByteOrderMarks.
134
135 2009-12-06  Chris Toshok  <toshok@ximian.com>
136
137         * JsonSerializationReader.cs (DeserializeGenericCollection): this
138         is jb's (iirc) patch, actually.  Types subclassing from
139         ICollection<T> need to be supported, and since it's an interface
140         the implementation might be explicit.  So instead of groveling
141         around in the actual type, we need to dispatch through the
142         interface's method.
143
144         * TypeMap.cs (CreateDefaultTypeMap): we need to include non-public
145         properties, since KeyValuePair items must be able to write to Key
146         and Value properties.
147
148         * JsonReader.cs (ReadContent): for builtin values (null, true,
149         false), use TryReadString instead of individual ReadChar's, since
150         they aren't reversible if the string didn't match.  In the default
151         case, if we're LameSilverlightLiseralParser, we need to push back
152         the current character onto the stream -- this is because for
153         netflix's AppConfig.json we were parsing "frameRatePolicy" as
154         "rameRatePolicy" (the 'f' was triggering the "false" parsing).
155         (class PushBackReader): add this class to unify all the pushing
156         back of characters we need to do.  1 character (JsonReader's old
157         "saved_char") isn't enough given that you could have a property
158         named, e.g., "falsifiable", and we'd need 4 characters worth of
159         pushback to recognize that correctly.
160
161 2009-11-20  Atsushi Enomoto  <atsushi@ximian.com>
162
163         * DataContractJsonSerializer.cs, JsonReader.cs : Silverlight uses
164           LAME parser that allows object member name as *raw* string
165           without double-quotes. (This also reverts the previous change.)
166
167 2009-11-12  Atsushi Enomoto  <atsushi@ximian.com>
168
169         *  JsonSerializationReader.cs : reuse generic collection search
170           logic in KnownTypeCollection.cs. Fixed bug #551671.
171
172 2009-10-30  Andreia Gaita  <avidigal@novell.com>
173
174         * DataContractJsonSerializer.cs: SL accepts keys without "", so tweak
175         the data to fix the quotes before passing it to the deserializer
176
177 2009-10-29  Chris Toshok  <toshok@ximian.com>
178
179         * TypeMap.cs (Deserialize): use
180         FormatterServices.GetUninitializedObject instead of
181         Activator.CreateInstance, since we shouldn't be invoking the
182         default ctor.
183
184         (forward ported to trunk on 2010-01-08 by atsushi)
185
186 2009-10-23  Atsushi Enomoto  <atsushi@ximian.com>
187
188         * DataContractJsonSerializer.cs
189           TypeMap.cs
190           JsonSerializationReader.cs : add experimental monotouch build.
191
192 2009-10-08  Atsushi Enomoto  <atsushi@ximian.com>
193
194         * DataContractJsonSerializer.cs, JsonSerializationWriter.cs:
195           alwaysEmitTypeInformation is  false by default. It is for __type
196           attribute, not for type attribute. __type name is always with ":#".
197         * TypeMap.cs : sort members in default typemap (it is ordered).
198           Uncomment EmitDefaultValue.
199         * JsonWriter.cs : handle "null" string (it is somewhat messy).
200
201 2009-10-05  Atsushi Enomoto  <atsushi@ximian.com>
202
203         * JsonReader.cs : copy string literal parser from System.Json.
204
205 2009-09-22  Atsushi Enomoto  <atsushi@ximian.com>
206
207         * JsonSerializationWriter.cs : output "type" attribute on bool
208           values too.
209         * JsonSerializationReader.cs : type loading attempt was insufficient
210           and hence often missed indicated types to deserialize.
211
212 2009-09-15  Atsushi Enomoto  <atsushi@ximian.com>
213
214         * JsonWriter.cs : use Stream as its output directly and avoid
215           extraneous preamble output. Fix interop with .NET.
216
217 2009-09-07  Atsushi Enomoto  <atsushi@ximian.com>
218
219         * JsonReaderWriterFactory.cs : check null stream (fix test failure).
220
221 2009-03-13  Andreia Gaita  <avidigal@novell.com>
222
223         * JsonReader.cs: fix depth calculation
224
225 2009-03-12  Geoff Norton  <gnorton@novell.com>
226
227         * TypeMap.cs: Avoid checking the getter/setter information until after
228         checking if we have the required attribute decorated.
229
230 2009-03-12  Andreia Gaita  <avidigal@novell.com>
231
232         * JsonReaderWriterFactory.cs: try to auto-detect encoding for streams
233         without BOM
234
235 2009-03-02  Chris Toshok  <toshok@ximian.com>
236
237         * JsonReader.cs: 2.1 has HasValue.
238
239 2009-02-02  Atsushi Enomoto  <atsushi@ximian.com>
240
241         * JsonReader.cs : show invalid input character in the error
242           message.
243
244 2009-02-02  Atsushi Enomoto  <atsushi@ximian.com>
245
246         * TypeMap.cs : in 2.1 do not use non-2.1 CreateInstance().
247
248 2009-02-02  Atsushi Enomoto  <atsushi@ximian.com>
249
250         * TypeMap.cs : allow get-only collections. Note that they are not
251           always deserializable (in .NET either).
252
253 2009-02-02  Atsushi Enomoto  <atsushi@ximian.com>
254
255         * TypeMap.cs : DataContractJsonSerializer in RTM does not seem to
256           reject contract-less types. So populate map for public members.
257         * DataContractJsonSerializer.cs : close XmlWriter to flush stream
258           (and it closes the stream by default).
259
260 2009-02-02  Andreia Gaita  <avidigal@novell.com>
261
262         * JsonSerializationReader.cs : Use 2.1 "approved" calls for Enum.Parse
263     and Convert.ChangeType
264
265 2008-02-18  Atsushi Enomoto  <atsushi@ximian.com>
266
267         * DataContractJsonSerializer.cs : IsStartObject() could raise
268           an arbitrary exception, so wrap it inside try-catch too to enclose
269           with SerializationException.
270         * JsonSerializationReader.cs : support DBNull.
271
272 2008-01-30  Atsushi Enomoto  <atsushi@ximian.com>
273
274         * DataContractJsonSerializer.cs : fixed .ctor(type, knonwTypes) that
275           missed to delegate knownTypes correctly.
276         * JsonSerializationReader.cs : consider KnownTypes correctly.
277           Take "__type" fully into consideration, not just for arrays.
278
279 2008-01-30  Atsushi Enomoto  <atsushi@ximian.com>
280
281         * JsonReader.cs : GetAttribute() was not still missing support for
282           __type.
283
284 2008-01-30  Atsushi Enomoto  <atsushi@ximian.com>
285
286         * JsonReader.cs : now __type is fully supported in every methods and
287           properties in correct shape.
288
289 2008-01-30  Atsushi Enomoto  <atsushi@ximian.com>
290
291         * JsonReader.cs : Do not consume "__type" (which is the first content
292           of an object) as an element content. It must be handled as an
293           attribute (it needs more changes).
294
295 2008-01-24  Atsushi Enomoto  <atsushi@ximian.com>
296
297         * JsonSerializationReader.cs : when deserializing primitive strings,
298           make use of "type" attribute (they are supposed to exist).
299           Output source reader location if available.
300         * JsonReader.cs : implement IXmlLineInfo.
301
302 2008-01-24  Atsushi Enomoto  <atsushi@ximian.com>
303
304         * JsonSerializationReader.cs : new, for JSON deserialization support.
305         * DataContractJsonSerializer.cs, TypeMap.cs :
306           basic support for deserialization.
307
308 2008-01-24  Atsushi Enomoto  <atsushi@ximian.com>
309
310         * DataContractJsonSerializer.cs,
311           TypeMap.cs,
312           JsonSerializationWriter.cs : split the first to those three files.
313
314 2008-01-24  Atsushi Enomoto  <atsushi@ximian.com>
315
316         * DataContractJsonSerializer.cs : Uri and Guid are serialized as
317           string. XmlQualifiedName is serialized as local:ns.
318
319 2008-01-22  Atsushi Enomoto  <atsushi@ximian.com>
320
321         * JsonWriter.cs : allow __type attribute. It required couple of
322           changes all around the class.
323         * DataContractJsonSerializer.cs : implemented large part of
324           serialization support (deserialization is not done yet).
325
326 2007-12-05  Atsushi Enomoto  <atsushi@ximian.com>
327
328         * DataContractJsonSerializer.cs :
329           moved from System.Runtime.Serialization and changed the namespace.
330         * JsonReader.cs, JsonWriter.cs, JsonReaderWriterFactory.cs,
331           IXmlJsonReaderInitializer.cs, IXmlJsonWriterInitializer.cs :
332           moved from System.Xml and changed the namespace.
333