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