Commit Graph
1315 Commits
Author SHA1 Message Date
James Newton-King f38ce92306 Merge pull request #1113 from stakx/issue-1112-jsonvalidatingreader-close
Make JsonValidatingReader close underlying JsonReader when CloseInput is true
2016-12-28 12:17:39 +13:00
stakx 7644768580 Make JsonValidatingReader close underlying reader
Add `Close` method override in `JsonValidatingReader` so that the
`CloseInput` property is observed properly. Also add a corresponding
unit test.
2016-12-26 12:21:45 +01:00
James Newton-King ee5a229922 Merge branch 'master' of https://github.com/JamesNK/Newtonsoft.Json 2016-12-26 15:01:15 +13:00
James Newton-King 5d7300f5b4 -Fixed tests 2016-12-26 15:00:40 +13:00
James Newton-King 4099870390 -Added support for any combination of paths and values in JSONPath filter expressions 2016-12-26 14:43:07 +13:00
James Newton-King bf88603c92 Merge pull request #1111 from stakx/issue-1097-clean-up-xml-documentation
Clean up XML documentation comments (continued)
2016-12-25 20:49:20 +13:00
stakx 1eb391c147 Replace "stream" in reader/writer classes' comments
XML documentation comments for JsonReader, JsonWriter and derived
classes often mention "underlying streams". In most cases however,
these types don't operate directly on Streams, but through other types
such as TextReader and TextWriter.

This commit changes these comments to reflect more accurately what
kind of objects the various JSON reader / writer classes operate on.

Additionally the effect of JsonReader.CloseInput and JsonWriter.Close-
Output is made more explicit in the comments for the Close methods.
2016-12-24 02:26:16 +01:00
James Newton-King cf6a917a46 Merge pull request #1109 from stakx/issue-1097-clean-up-xml-documentation
Clean up XML documentation comments (continued)
2016-12-24 10:19:05 +13:00
stakx e19ac3f28c Add & fix crefs in XML document comments
* Add references to types where they are missing.

 * Fix incorrect references to closed generic types.

 * Convert member ID strings to proper references where they can be
   converted without breaking the build. The remaining member ID
   strings usually mean that the comment would have to be rephrased
   for at least one build target / platform.

 * Drop namespaces from type names where they are unnecessary.

 * Fix the odd typo and add additional <c> markup in a few places.
2016-12-23 16:15:24 +01:00
James Newton-King 780100b81f Merge pull request #1106 from stakx/issue-1097-clean-up-xml-documentation
Clean up XML documentation comments (continued)
2016-12-19 22:14:42 +13:00
stakx 937d5a53bb XML comments: consistent formatting of C# keywords 2016-12-19 09:29:22 +01:00
James Newton-King d244812522 Merge pull request #1105 from stakx/issue-1097-clean-up-xml-documentation
Clean up XML documentation comments (continued)
2016-12-18 15:17:01 +13:00
stakx 2e6d2ecd4c Fix typos, punctuation, etc. in XML doc comments
* Simple stuff: typos and missing punctuation and line breaks.

 * Sometimes, two method overloads have quite different documentation.
   Rephrase these to make them more similar.

 * Minor rephrasings like in a previous commit (e.g. "...how output
   should be formatted", "initializes a new instance of...").

 * Obvious incorrect type references in comments. These appear mostly
   in `Utilities/LinqBridge.cs` (nullable vs non-nullable).

 * Remove factually incorrect statement about exceptions thrown.

 * Remove comments for explicitly implemented interface methods.
2016-12-18 01:01:46 +01:00
James Newton-King 5456067b11 Merge pull request #1098 from stakx/issue-1097-clean-up-xml-documentation-comments
Fix minor issues in XML documentation comments
2016-12-11 13:47:59 +13:00
stakx f27ad19eb0 Amend omission in previous commit 2016-12-11 01:26:14 +01:00
stakx 01f370d1ff Change comments as per @JamesNK's feedback
* Explicitly implemented interfaces don't need comments.

 * Protected constructors of abstract classes should be documented
   like Microsoft does on MSDN.

 * Replace term "Common Language Runtime (CLR) type" with ".NET type".
2016-12-11 01:19:50 +01:00
stakx 3c6b49a3dd Revert crefs that cannot be resolved in all targets 2016-12-11 00:14:03 +01:00
stakx 067768a658 Fix minor issues in XML documentation comments
This fixes several minor issues in the code's documentation comments,
such as spelling errors, missing punctuation and references to other
code elements, and a few other small inconsistencies.
2016-12-10 22:53:40 +01:00
James Newton-King 133bbc2d38 -Fixed roundtripping double.MaxValue and float.MaxValue as dictionary keys 2016-12-10 17:23:43 +13:00
James Newton-King 3c1fdf9fdd -Derp 2016-12-08 09:50:07 +13:00
James Newton-King 4d425ccd06 -Fix merging null with complex type and MergeNullValueHandling.Ignore 2016-12-08 09:47:01 +13:00
James Newton-King be8ca7a870 -Refactor 2016-11-27 13:58:21 +13:00
James Newton-King 5269ce81c0 -Fixed serializing protected override properties 2016-11-27 13:33:52 +13:00
James Newton-King 38809c68e8 -Refactor away var 2016-11-07 13:33:53 -08:00
James Newton-King b2afa9d674 -Fixed StringEnumConverter when EnumMember defines members that differ only by case 2016-11-06 20:58:32 -08:00
James Newton-King a8ab6b3436 Merge pull request #1073 from Rantanen/master
Fix null reference error when deserializing bytes
2016-11-06 09:03:54 +13:00
Mikko Rantanen b47f7440d1 Fix null reference error when deserializing bytes
If the JSON contained empty object "{}" for a byte[] property, the `JsonReader` ended up trying to read the object content despite the fact that the content didn't exist. This caused a null reference exception.

The fix ensures the value exists before trying to read it. If the value doesn't exist, the execution ends up in "Unexpected token" exception with way more informative error message.
2016-11-05 15:38:52 +02:00
James Newton-King e2dc61b8f3 -Test 2016-11-05 23:42:40 +13:00
James Newton-King b2e30121db Merge pull request #1072 from recycleddan/master
Fix return type for SByte and SByteNullable in ToObject
2016-11-05 23:41:15 +13:00
James Newton-King 803403ae21 -Fixed deserializing generic only IList types with a constructor override 2016-11-05 23:21:34 +13:00
Dan Carter b234eafbf2 Fix return type for SByte and SByteNullable in ToObject 2016-11-04 13:33:05 -04:00
James Newton-King 989d980be6 Merge pull request #1064 from hughbe/implicit-conversion
Add a test for deserializing an IEnumerable with implicit conversion
2016-10-31 23:22:30 +13:00
Hugh Bellamy 123e8a54c5 Add a test for deserializing an IEnumerable with implicit conversion 2016-10-31 09:29:26 +00:00
James Newton-King ae074a3469 -Fixed incorrectly parsing scan filter when name is quoted
-Added support for multiple names in scan filter
2016-10-28 13:25:52 +13:00
James Newton-King 26d8871254 Merge pull request #1044 from pyitphyoaung/Breaking-up-JsonTextReaderTest
Break up JsonTextReaderTest class into smaller test classes
2016-10-25 17:02:37 +13:00
James Newton-King 07b070065a -Refactor 2016-10-25 16:30:30 +13:00
James Newton-King 2d4b86b08e Merge branch 'is-reference-bug' of https://github.com/TylerBrinkley/Newtonsoft.Json into TylerBrinkley-is-reference-bug 2016-10-25 16:09:36 +13:00
James Newton-King 29c84fd7c2 -Improved error when attempting to convert root JSON object property to an XML attribute 2016-10-25 14:43:27 +13:00
James Newton-King 0e0918b143 -Derp 2016-10-24 16:13:23 +13:00
James Newton-King b7e77700ac -Added auto outlines to many documentation pages 2016-10-24 16:12:52 +13:00
James Newton-King 0721bd4dec -Fixed not erroring when deserializing incomplete JSON with a parameterized constructor 2016-10-24 14:20:59 +13:00
James Newton-King 570a7ca078 -Fixed deserializing a duplicate dictionary key from a parameterized constructor 2016-10-24 12:57:17 +13:00
James Newton-King fb1acd0c83 Merge pull request #1051 from TylerBrinkley/nullable-struct-typename-bug
Stops including typename for nullable structs using TypeNameHandling.Auto
2016-10-19 10:15:15 +13:00
TylerBrinkley 53278cbe57 Added deserialization test and cleaned up the tests 2016-10-18 12:05:49 -05:00
TylerBrinkley 2a28dcc544 Stops including the typename for nullable structs using TypeNameHandling.Auto, fixes #1050 2016-10-18 11:34:43 -05:00
Pyit Phyo Aung 26ae7d07fc Break up JsonTextReaderTest class into smaller test classes 2016-10-14 00:20:09 +13:00
James Newton-King 6890cfcc6c Merge pull request #1043 from pyitphyoaung/Move-classes-to-files-under-TestObjects
Move more classes to files under TestObjects
2016-10-13 16:08:01 +13:00
Pyit Phyo Aung 0115df6e39 Merge branch 'master' into Move-classes-to-files-under-TestObjects
# Conflicts:
#	Src/Newtonsoft.Json.Tests/Converters/IsoDateTimeConverterTests.cs
#	Src/Newtonsoft.Json.Tests/Linq/JObjectTests.cs
#	Src/Newtonsoft.Json.Tests/Schema/ExtensionsTests.cs
#	Src/Newtonsoft.Json.Tests/Serialization/DependencyInjectionTests.cs
#	Src/Newtonsoft.Json.Tests/Serialization/ExtensionDataTests.cs
#	Src/Newtonsoft.Json.Tests/Serialization/PopulateTests.cs
#	Src/Newtonsoft.Json.Tests/Serialization/TypeNameHandlingTests.cs
#	Src/Newtonsoft.Json.Tests/TestObjects/Money/Currency.cs
2016-10-13 14:49:15 +13:00
James Newton-King ae291d6b3b Merge pull request #1042 from pyitphyoaung/Issue774-Removal-of-netfx-core-directive-usage
Clean up NETFX_CORE directive usage
2016-10-13 13:07:09 +13:00
Pyit Phyo Aung 42d6225acd Move more classes to files under TestObjects 2016-10-13 12:29:26 +13:00