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