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