Commit Graph
11 Commits
Author SHA1 Message Date
Viktor Hofer d5079dda17 Remove ProjectGUIDs from project files and Project and Name attributes from P2Ps (dotnet/corefx#40926)
* Remove ProjectGUIDs from P2Ps

* Remove ProjectGUIDs from project files

Commit migrated from https://github.com/dotnet/corefx/commit/c22714d65151968a17c3b232748880d5e7961dee
2019-09-09 18:21:25 +02:00
Steve Harter 7adb86b94d Add UTF-8 APIs on TextEncoder and add JavascriptEncoder to JsonEncodedText (dotnet/corefx#39415)
Commit migrated from https://github.com/dotnet/corefx/commit/bbbcac59ac07f344ce4e257ef182a90c429d2b58
2019-07-15 09:39:58 -07:00
Jose Perez Rodriguez 755bd54da2 Removing the Manual reference file from System.Text.Json (dotnet/corefx#38409)
* Removing the Manual reference file from System.Text.Json

* Readd the netcoreapp and uap configurations so that we don't have to bring AsyncInterfaces package into the shared framework closure

* Revert param name change as per PR Feedback


Commit migrated from https://github.com/dotnet/corefx/commit/5b3d41c1c63c4ebd93af7e6482e954e104827884
2019-06-17 14:10:20 -07:00
Jose Perez Rodriguez dcdbef726e Adding net461 target to Microsoft.Bcl.* packages (dotnet/corefx#38104)
* Adding net461 target to Microsoft.Bcl.* packages

* Adding System.Text.Json net461 target as well


Commit migrated from https://github.com/dotnet/corefx/commit/fdab38c206fe545b53d043f81be574cdbe9b5b8c
2019-05-31 11:43:52 -07:00
Jose Perez Rodriguez 7d8177c8c3 Fix VS Configurations for all projects in corefx (dotnet/corefx#37477)
Commit migrated from https://github.com/dotnet/corefx/commit/1c48331eb5784c58b81309665257f454abd7d322
2019-05-06 14:46:10 -07:00
Jose Perez Rodriguez b8f2c10340 Adding System.Text.Json OOB package (dotnet/corefx#37129)
* Adding System.Text.Json OOB package

* Removing SourceRewriter dependency as it won't be used by the repo any longer

* Address PR Feedback


Commit migrated from https://github.com/dotnet/corefx/commit/61024c30b966ee63c357a491370a2daf94c4c42f
2019-04-26 16:49:25 -07:00
Ahson Khan 597fd58cdd Re-design Utf8JsonWriter as a regular class rather than a ref struct. (dotnet/corefx#36961)
* Add an in-box array-backed IBufferWriter<T>

* Update Utf8JsonWriter ref and main writer file.

* Fix JsonWriter WriteValue APIs.

* Use Environment.NewLine static and invert some stream conditions.

* Update JsonWriter properties and fix serializer build breaks.

* Update JsonWriter unit tests.

* Add xml comments, clean up, and improve test coverage.

* Update JsonDocument and JsonSerializer to react to JsonWriter changes.

* Normalize the reference assembly.

* Do not escape/validate comments and update issue number.

* Do not escape comments and validate they don't contain embedded
delimiter

* Remove dead code and update issue number in comments.

* Throw InvalidOEx instead of ArgEx if IBW doesn't give requested memory.

* Fix test build breaks for netfx.

* Remove dead code and fix source packaging.

* Address PR feedback.

* Disable writing floats test on windows

* 8 digit floats don't work well on older TFMs. Reduce to 7.


Commit migrated from https://github.com/dotnet/corefx/commit/1f9b84a0804e868c7e0f37a3c10fbaf7c735ae14
2019-04-17 23:57:50 -07:00
Steve Harter 3370c01aa3 Initial Json serialization functionality (dotnet/corefx#35609)
Commit migrated from https://github.com/dotnet/corefx/commit/20657b549ab4de422c3f7a9c50e22bf4d7f789a5
2019-03-02 13:20:34 -06:00
Ahson Khan 0d4e63be32 Update S.T.Json sources with ifdefs so that a netstandard compatible source package can be produced (dotnet/corefx#34611)
* Test changes necessary to build S.T.Json sources targetting netstandard

* Revert unnecessary change from private to internal.

* Revert props and csproj changes to support netstandard along with test
changes.

* Address PR feedback.

* Revert "Revert props and csproj changes to support netstandard along with test"

This reverts commit dotnet/corefx@7a2f22e127.

* Fix code formatting/spacing.

* Invert the ifdef so it is false by default (for source package) and add
comments.


Commit migrated from https://github.com/dotnet/corefx/commit/36893daefdc114306efe86eca4170836bc02ff68
2019-01-17 12:50:48 -08:00
Ahson Khan 714a878eb7 Add JsonUtf8Reader (for ReadOnlySpan) along with unit tests (dotnet/corefx#33216)
* Initial check-in for System.Text.Json library and solution

* Auto-generate the reference assembly

* Provide an overview README and roadmap

* Change the solution GUID to be unique

* Fix package description nit

* Change to MIT license instead of GPL

* Fix file extension of images to png

* Address PR feedback and only support netcoreapp

* Fix the configuration props and project files

* Add comments to the JsonTokenType enum

* Add an internal class for commonly used constants when reading JSON.

* Add a comment handling enum for lenient JSON reading

* Add a JsonReaderOptions struct to provide extensible customization of
JsonReader behaviour

* Add a JsonReaderException class which is thrown when we see an invalid
JSON text

* Add the skeleton for the JsonUtf8Reader ref struct and add files to
csproj

* Add JsonReaderState, ThrowHelper, and Strings resource file

* Address PR feedback, remove OS-specific configurations

* Complete the implementation of core JsonReader APIs for reading spans

* Update the reference assembly by auto-generating it

* Add unit tests and TryGet APIs

* Add XML comments to describe the JsonUtf8Reader at a high level

* Fix config and csproj to reference S.R.CS.U from Corelib

* Rename type from JsonUtf8Reader to Utf8JsonReader

* Remove remnants of ReadOnlySequeunce related fields/properties

* Add the remaining TryGetValueAsX APIs

* Change JsonReaderState ctor to accept JsonReaderOptions instead

* Seal the JsonReaderException class

* Rename LineBytePosition to BytePositionInLine

* Fix typo in ArrayEndWithinObject exception message

* Capitalize the acronym JSON within exception messages.

* Override GetObjectData and add a private deserialization ctor on
JsonReaderException

* Be explicit with lessThan in the IndexOfAny call site

* Only use ulong when Options isn't AllowComments to align stack usage

* Rename IndexOfAny helper to IndexOfOrLessThan

* Remove stray comment and fix xml comment for BytesConsumed

* Braces everywhere

* Rename localCopy to localBuffer to tie it to _buffer

* Add IsDigit and IsHexDigit helper methods

* Rename Solidus to Slash, ReverseSolidus to BackSlash, and Use Asterisk constant

* Use static encoder and avoid unnecessary allocation.

* Combine multiple TryParse calls that only differ by standardFormat

* Use SR.Format instead of string.Format and add debug.fail for default
case

* Make the exception as serializable and add test to BinaryFormatterTestData

* Fix exception messages, avoid printing control characters, and remove
unnecessary else.

* Make sure all exception messages are consistent and that they make sense
in context.

* Fix and add new comments, rename internal enum values, and remove
JsonLab

* Throw InvalidCastException from TryGetAsX if token type doesn't match

* Resolve TODOs, add issues, fix search for end of string, and remove recursive calls + add more tests.

* Use Unicode escape sequences for non-ASCII characters in tests.

* Add more tests related to skipping and consuming comments.

* Allocate the stack lazily, only when depth actually surpasses 64.

* Add a netcoreapp config to
System.Runtime.Serialization.Formatters.Tests.csproj

* Remove unnecessary DefineConstants property in test csproj

* Use Invariant Culture where necessary to avoid tests failing on es-ES
machines

* Fix up nits in the exception messages

* Add an IsTokenTypePrimitive helper method and fix comment spelling

* Use helper, use while(true) instead of goto, and change TryGet methods
to throw InvalidOperationException

* Shorten CommentHandling enum values and rename Default to Disallow

* Fix "is the stack empty" check in EndObject/EndArray

* Add previous token type to state and update it when token type is not a
comment

* Include comment delimiters as part of comment token, fix Debug.Assert
and tests.

* Add helper to avoid code duplication

* Add temporary workaround for Utf8 double parsing issue


Commit migrated from https://github.com/dotnet/corefx/commit/43759525e9a01fb9caedc0fb2281db5c65a16f65
2018-11-09 02:53:01 -08:00
Ahson Khan 7320f4b50c Initial check-in for the System.Text.Json library and solution (dotnet/corefx#33203)
* Initial check-in for System.Text.Json library and solution

* Auto-generate the reference assembly

* Provide an overview README and roadmap

* Change the solution GUID to be unique

* Fix package description nit

* Change to MIT license instead of GPL

* Fix file extension of images to png

* Address PR feedback and only support netcoreapp

* Fix the configuration props and project files

* Address PR feedback, remove OS-specific configurations for netcoreapp

* Remove plantUML related files and add backup owner.

* Rename from JsonUtf8Reader to Utf8JsonReader within the package
description


Commit migrated from https://github.com/dotnet/corefx/commit/3af75a867043e70e0ccaa0bfe3846d1d573879ee
2018-11-05 11:45:01 -08:00