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