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