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