Jon Hanna
d764cfae1a
Null Check on JsonWriter.WriteToken
...
Fixes #752
2015-12-20 14:23:01 +00:00
James Newton-King
dca5260334
-Fixed JsonWriter IDisposable implementation
2015-12-19 15:25:33 +13:00
James Newton-King
428a942203
Merge pull request #747 from JonHanna/gc_suppress_in_dispose
...
Suppress finaliser in Dispose if there's a protected Dispose(bool)
2015-12-19 08:55:40 +13:00
Jon Hanna
40bd051809
Suppress finaliser in Dispose if there's a protected Dispose(bool)
...
Fixes #746
2015-12-18 19:03:36 +00:00
James Newton-King
48786adc5b
Merge pull request #743 from JonHanna/defer_reflection
...
Move reflection calls until after branches that may mean they're unused
2015-12-18 09:02:55 +13:00
Jon Hanna
dbbe944b19
Move reflection calls until after branches that may mean they're unused
...
A handful of cases where reflection calls are made prior to branches that
might lead to the results not being used.
2015-12-17 18:27:12 +00:00
James Newton-King
9d8e59589b
Merge pull request #741 from JonHanna/faster_nullable_value_access
...
Use GetValueOrDefault() over Value when Nullable<T> known non-null
2015-12-16 12:40:35 +13:00
Jon Hanna
7e6194b61b
Use GetValueOrDefault() over Value when Nullable<T> known non-null
...
GetValueOrDefault() is an easily-inlined access to a field as this
will hold the correct value for both HasValue and !HasValue cases.
The Value property in comparison contains a branch on a check that the
Nullable<T> has its internal hasValue flag to decide whether to throw
InvalidOperationException or not.
Hence when a nullable type is known to have a value (not be null) and
one wants the value, rather than to possibly trigger the exception-throw
GetValueOrDefault() has a slight performance benefit over Value.
Accordingly, replace calls to the Value property with calls to
GetValueOrDefault() when previous checks or assignments guarantee the
value is not null.
2015-12-15 19:15:58 +00:00
James Newton-King
60cce16d43
-Documentation
2015-12-13 20:40:33 +13:00
James Newton-King
4c256e7afd
-Fixed casting dynamic JValue to JToken
2015-12-13 18:56:10 +13:00
James Newton-King
815b283e58
-Refactored buffer pool
2015-12-13 15:40:37 +13:00
James Newton-King
4e2acac33a
-Formatting
2015-12-12 18:22:06 +13:00
James Newton-King
a5d1a41e14
-Removed generic SerializeObject methods
2015-12-12 18:14:57 +13:00
James Newton-King
eec87d257d
-Derp
2015-12-09 13:03:56 +13:00
James Newton-King
2c7a51c50a
-Added generic JsonConvert.SerializeObject methods
...
-Fixed JToken.ToObject not using StringEnumConverter on enums
2015-12-09 08:45:36 +13:00
James Newton-King
45936d58a2
-Fixed converting JSON to XML with invalid XML name characters
2015-12-06 22:10:58 +13:00
James Newton-King
709dd8cea6
-Merge
2015-12-06 21:08:04 +13:00
James Newton-King
a64616f9f9
-Fixed setting default values onto properties already set in constructor when deserializing
2015-12-06 20:26:55 +13:00
Oleg Deribas
7ce78833f4
When converting JSON to XML encode characters in JSON property names which are not compatible with XML and decode when converting back.
2015-12-05 20:09:03 +00:00
James Newton-King
92102f9a33
-Fixed deserializing to a type when setting JToken extension data
2015-12-05 13:01:46 +13:00
James Newton-King
eb0cbd6a75
-Formatting
...
-Build
2015-12-04 23:54:38 +13:00
James Newton-King
c96779dc10
-Fixed deserializing certain Microsoft formated dates
2015-11-28 21:48:10 +13:00
James Newton-King
7d4790589f
Merge branch 'barsgroup-master'
2015-11-28 19:46:46 +13:00
James Newton-King
0b251cd063
Merge branch 'master' of https://github.com/barsgroup/Newtonsoft.Json into barsgroup-master
2015-11-28 19:46:21 +13:00
James Newton-King
b2827d3ddb
-Tests
2015-11-28 19:46:00 +13:00
James Newton-King
226832ff5d
-Fixed error when deserializing ignored property with mismatched type
2015-11-28 18:13:10 +13:00
Dmitry Kalyanov
f3706313ef
Compare BaseDefinition for properties when adding private properties.
...
Due to difference in mono vs .net (see https://bugzilla.xamarin.com/show_bug.cgi?id=36305 ),
MethodInfo.GetBaseDefinition() does not actually return base class (it returns partially-instantiated
generic class) in mono when overriding property from generic base class. Because of this, lookup
of matching property in ReflectionUtils.GetChildPrivateProperties() fails to find
already added property and adds the same property multiple times. Comparing GetBaseDefinition()'s
compensates for this: since the same function is applied to both PropertyInfo's, matching property
will be found.
This fixes issue #726 .
2015-11-27 15:58:15 +03:00
James Newton-King
425c1d8402
-Fixed converting null string JValues to XML
2015-11-25 01:18:59 +13:00
James Newton-King
2c3dafd62d
-Fixed bug when converting an integer JValue to a nullable enum
2015-11-23 22:02:47 +13:00
James Newton-King
a9c7d60d22
-Improved JArray bad indexer message
2015-11-23 20:31:28 +13:00
James Newton-King
331fcc0ebb
-Added support for 24 hour ISO dates
2015-11-23 20:15:37 +13:00
James Newton-King
7903b4b2e2
-Added JsonLoadSettings.LineInfoHandling
2015-11-21 19:31:17 +13:00
James Newton-King
000407f610
-Added Required.DisallowNull
2015-11-15 21:25:47 +13:00
James Newton-King
5ae9edc926
-Increment version to beta2
2015-11-14 16:26:06 +13:00
James Newton-King
a3eb2d596c
-Fixed DateTimeZoneHandling not being used when writing DateTime dictionary keys
...
-Buffer pooling fixes
-Improved date parsing performance
2015-11-14 15:22:59 +13:00
James Newton-King
f3822513df
-Improve ignore case get property performance
2015-11-14 10:46:16 +13:00
James Newton-King
8e1a59b8e6
-Fixed error when ReferenceResolver is set to null
2015-11-12 23:53:10 +13:00
James Newton-King
ac1a46bd14
-Added IJsonBufferPool, performance stuff
2015-11-12 22:08:39 +13:00
James Newton-King
d91e8f4425
-Fixed NZ culture tests on Windows 10
2015-11-02 10:12:19 -08:00
James Newton-King
d4916a76b5
-Build
2015-10-18 15:06:56 +13:00
James Newton-King
a5e516bb5d
-Build
2015-10-18 14:36:37 +13:00
James Newton-King
ab2906874f
-Changed DateTimeOffset JValue to return TypeCode.Object
...
-Incremented version to 8.0.1-beta1
2015-10-18 13:42:31 +13:00
James Newton-King
18e45e2b75
-Build
2015-10-17 18:26:11 +13:00
James Newton-King
a48ccc781c
-Build
2015-10-16 21:42:59 +13:00
James Newton-King
88468c4e6e
Merge branch 'vontangen-master'
2015-10-12 21:43:30 +13:00
James Newton-King
723704464f
-ShouldDeserialize PR cleanup
2015-10-12 21:40:00 +13:00
James Newton-King
74af3a8ba9
Merge branch 'master' of https://github.com/vontangen/Newtonsoft.Json into vontangen-master
2015-10-12 20:27:21 +13:00
James Newton-King
57f4f98162
-Added support for deserializing Version from string
2015-10-10 23:20:20 +13:00
James Newton-King
e1c00f0995
-Documentation
2015-10-10 12:02:14 +13:00
James Newton-King
2bf31b9605
-Added JsonLoadSettings
...
-Added CommentsHandling
-Changed LINQ to JSON load to ignore array comments by default
2015-10-06 22:17:25 +13:00