From 84a68c597782c84e243a6dff3b1defaeb73e6163 Mon Sep 17 00:00:00 2001 From: Wojciech Figat Date: Sat, 17 Dec 2022 13:38:30 +0100 Subject: [PATCH] Update `Newtonsoft.Json` to `13.0.2` and .Net 7 --- Source/Engine/Serialization/JsonSerializer.cs | 9 +- ...sualStudio.Setup.Configuration.Interop.dll | 3 - ...sualStudio.Setup.Configuration.Interop.xml | 886 ------------------ Source/Platforms/DotNet/Newtonsoft.Json.dll | 4 +- Source/Platforms/DotNet/Newtonsoft.Json.pdb | 4 +- Source/Platforms/DotNet/Newtonsoft.Json.xml | 594 ++++++++++-- .../Flax.Build/Build/DotNet/Builder.DotNet.cs | 2 +- .../Deps/Dependencies/NewtonsoftJson.cs | 8 +- Source/Tools/Flax.Build/Flax.Build.csproj | 7 +- .../VisualStudio/CSSDKProjectGenerator.cs | 17 +- 10 files changed, 547 insertions(+), 987 deletions(-) delete mode 100644 Source/Platforms/DotNet/Microsoft.VisualStudio.Setup.Configuration.Interop.dll delete mode 100644 Source/Platforms/DotNet/Microsoft.VisualStudio.Setup.Configuration.Interop.xml diff --git a/Source/Engine/Serialization/JsonSerializer.cs b/Source/Engine/Serialization/JsonSerializer.cs index 29a5951f9..4aa84a337 100644 --- a/Source/Engine/Serialization/JsonSerializer.cs +++ b/Source/Engine/Serialization/JsonSerializer.cs @@ -101,13 +101,8 @@ namespace FlaxEngine.Json /// True if both objects are equal, otherwise false. public static bool ValueEquals(object objA, object objB) { - // If referenced object has the same linkage to the prefab object as the default value used in SerializeDiff, then mark it as equal - /*if (objA is ISceneObject sceneObjA && objB is ISceneObject sceneObjB && (sceneObjA.HasPrefabLink || sceneObjB.HasPrefabLink)) - { - return sceneObjA.PrefabObjectID == sceneObjB.PrefabObjectID; - }*/ - - return Newtonsoft.Json.Utilities.MiscellaneousUtils.DefaultValueEquals(objA, objB); + // Use default value comparision used by C# json serialization library + return Newtonsoft.Json.Utilities.MiscellaneousUtils.ValueEquals(objA, objB); } /// diff --git a/Source/Platforms/DotNet/Microsoft.VisualStudio.Setup.Configuration.Interop.dll b/Source/Platforms/DotNet/Microsoft.VisualStudio.Setup.Configuration.Interop.dll deleted file mode 100644 index 993fcb2f3..000000000 --- a/Source/Platforms/DotNet/Microsoft.VisualStudio.Setup.Configuration.Interop.dll +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:839f15d54bbbe5a3c297c9b46b62f69f6e09694b694be3bb9b1450b012403168 -size 28992 diff --git a/Source/Platforms/DotNet/Microsoft.VisualStudio.Setup.Configuration.Interop.xml b/Source/Platforms/DotNet/Microsoft.VisualStudio.Setup.Configuration.Interop.xml deleted file mode 100644 index 20bdc0763..000000000 --- a/Source/Platforms/DotNet/Microsoft.VisualStudio.Setup.Configuration.Interop.xml +++ /dev/null @@ -1,886 +0,0 @@ - - - - Microsoft.VisualStudio.Setup.Configuration.Interop - - - - - Information about errors that occured during install of an instance. - - - May also implement . - - - - - Gets the HRESULT of the error. - - The HRESULT of the error. - - - - Gets the class name of the error (exception). - - The class name of the error (exception). - - - - Gets the error message. - - The error message. - - - - Information about the error state of an instance. - - - - - Gets an array of failed package references. - - An array of failed package references. - - - - Gets an array of skipped package references. - - An array of skipped package references. - - - - Gets the path to the error log. - - The path to the error log. - - - - Gets the path to the main setup log. - - The path to the main setup log. - - - - Gets the runtime error that occured during install of an instance. - - The runtime error that occured during install of an instance. - - - - A reference to a failed package. - - - You can enumerate all properties of basic types by casting to an . - - - - - Gets the general package identifier. - - The general package identifier. - - - - Gets the version of the package. - - The version of the package. - - - - Gets the target process architecture of the package. - - The target process architecture of the package. - - - - Gets the language and optional region identifier. - - The language and optional region identifier. - - - - Gets the build branch of the package. - - The build branch of the package. - - - - Gets the type of the package. - - The type of the package. - - - - Gets the unique identifier consisting of all defined tokens. - - The unique identifier consisting of all defined tokens. - - - - Gets a value indicating whether the package refers to an external extension. - - A value indicating whether the package refers to an external extension. - - - - Gets the path to the optional package log. - - The path to the optional package log. - - - - Gets the description of the package failure. - - The description of the package failure. - - - - Gets the signature to use for feedback reporting. - - The signature to use for feedback reporting. - - - - Gets the array of details for this package failure. - - An array of details for this package failure. - - - - Gets an array of packages affected by this package failure. - - An array of packages affected by this package failure. This may be null. - - - - Gets the action attempted when the package failed. - - The action, eg. Install, Download, etc. - - - - Gets the return code of the failure. - - The return code. - - - - A reference to a failed package. - - - You can enumerate all properties of basic types by casting to an . - - - - - Gets the general package identifier. - - The general package identifier. - - - - Gets the version of the package. - - The version of the package. - - - - Gets the target process architecture of the package. - - The target process architecture of the package. - - - - Gets the language and optional region identifier. - - The language and optional region identifier. - - - - Gets the build branch of the package. - - The build branch of the package. - - - - Gets the type of the package. - - The type of the package. - - - - Gets the unique identifier consisting of all defined tokens. - - The unique identifier consisting of all defined tokens. - - - - Gets a value indicating whether the package refers to an external extension. - - A value indicating whether the package refers to an external extension. - - - - Gets the path to the optional package log. - - The path to the optional package log. - - - - Gets the description of the package failure. - - The description of the package failure. - - - - Gets the signature to use for feedback reporting. - - The signature to use for feedback reporting. - - - - Gets the array of details for this package failure. - - An array of details for this package failure. - - - - Gets an array of packages affected by this package failure. - - An array of packages affected by this package failure. This may be null. - - - - An enumerator of installed objects. - - - - - Retrieves the next set of product instances in the enumeration sequence. - - The number of product instances to retrieve. - A pointer to an array of . - A pointer to the number of product instances retrieved. If is 1 this parameter may be NULL. - - - - Skips the next set of product instances in the enumeration sequence. - - The number of product instances to skip. - - - - Resets the enumeration sequence to the beginning. - - - - - Creates a new enumeration object in the same state as the current enumeration object: the new object points to the same place in the enumeration sequence. - - A pointer to a pointer to a new interface. If the method fails, this parameter is undefined. - - - - Information about a catalog used to install an instance. - - - - - Gets catalog information properties. - - An containing catalog information properties. - The property is not defined or invalid. - - - - Gets a value indicating whether the catalog is a prerelease. - - A value indicating whether the catalog is a prerelease. - The property is not defined or invalid. - - - - Provides localized properties of an instance of a product. - - - - - Gets localized product-specific properties. - - An of localized product-specific properties, or null if no properties are defined. - - - - Gets localized channel-specific properties. - - An of localized channel-specific properties, or null if no properties are defined. - - - - The state of an . - - - - - The instance state has not been determined. - - - - - The instance installation path exists. - - - - - A product is registered to the instance. - - - - - No reboot is required for the instance. - - - - - No errors were reported for the instance. - - - - - The instance represents a complete install. - - - - - Gets information about product instances set up on the machine. - - - - - Enumerates all launchable product instances installed. - - An enumeration of installed product instances. - - - - Gets the instance for the current process path. - - The instance for the current process path. - - The returned instance may not be launchable. - - - - - Gets the instance for the given path. - - Path used to determine instance - The instance for the given path. - - The returned instance may not be launchable. - - - - - Enumerates all product instances. - - An enumeration of all product instances. - - - - Gets information about product instances installed on the machine. - - - - - Enumerates all launchable product instances installed. - - An enumeration of installed product instances. - - - - Gets the instance for the current process path. - - The instance for the current process path. - - The returned instance may not be launchable. - - - - - Gets the instance for the given path. - - Path used to determine instance - The instance for the given path. - - The returned instance may not be launchable. - - - - - Information about the error state of an instance. - - - - - Gets an array of failed package references. - - An array of failed package references. - - - - Gets an array of skipped package references. - - An array of skipped package references. - - - - Information about the error state of an instance. - - - - - Gets an array of failed package references. - - An array of failed package references. - - - - Gets an array of skipped package references. - - An array of skipped package references. - - - - Gets the path to the error log. - - The path to the error log. - - - - Gets the path to the main setup log. - - The path to the main setup log. - - - - A reference to a failed package. - - - You can enumerate all properties of basic types by casting to an . - - - - - Gets the general package identifier. - - The general package identifier. - - - - Gets the version of the package. - - The version of the package. - - - - Gets the target process architecture of the package. - - The target process architecture of the package. - - - - Gets the language and optional region identifier. - - The language and optional region identifier. - - - - Gets the build branch of the package. - - The build branch of the package. - - - - Gets the type of the package. - - The type of the package. - - - - Gets the unique identifier consisting of all defined tokens. - - The unique identifier consisting of all defined tokens. - - - - Gets a value indicating whether the package refers to an external extension. - - A value indicating whether the package refers to an external extension. - - - - Helper functions. - - - - - Parses a dotted quad version string into a 64-bit unsigned integer. - - The dotted quad version string to parse, e.g. 1.2.3.4. - A 64-bit unsigned integer representing the version. You can compare this to other versions. - - - - Parses a dotted quad version string into a 64-bit unsigned integer. - - The string containing 1 or 2 dotted quad version strings to parse, e.g. [1.0,) that means 1.0.0.0 or newer. - A 64-bit unsigned integer representing the minimum version, which may be 0. You can compare this to other versions. - A 64-bit unsigned integer representing the maximum version, which may be MAXULONGLONG. You can compare this to other versions. - - - - Information about an instance of a product. - - - You can enumerate all properties of basic types by casting to an . - - - - - Gets the instance identifier (should match the name of the parent instance directory). - - The instance identifier. - - - - Gets the local date and time when the installation was originally installed. - - The local date and time when the installation was originally installed. - - - - Gets the unique name of the installation, often indicating the branch and other information used for telemetry. - - The unique name of the installation, often indicating the branch and other information used for telemetry. - - - - Gets the path to the installation root of the product. - - The path to the installation root of the product. - - - - Gets the version of the product installed in this instance. - - The version of the product installed in this instance. - - - - Gets the display name (title) of the product installed in this instance. - - The LCID for the display name. - The display name (title) of the product installed in this instance. - - - - Gets the description of the product installed in this instance. - - The LCID for the description. - The description of the product installed in this instance. - - - - Resolves the optional relative path to the root path of the instance. - - A relative path within the instance to resolve, or NULL to get the root path. - The full path to the optional relative path within the instance. If the relative path is NULL, the root path will always terminate in a backslash. - - - - Gets the state of the instance. - - The state of the instance. - - - - Gets an array of package references registered to the instance. - - An array of package references registered to the instance. - - - - Gets a package reference to the product registered to the instance - - A package reference to the product registered to the instance. This may be null if does not return . - - - - Gets the relative path to the product application, if available. - - The relative path to the product application, if available. - - - - Gets the error state of the instance, if available. - - The error state of the instance, if available. - - - - Gets a value indicating whether the instance can be launched. - - Whether the instance can be launched. - - An instance could have had errors during install but still be launched. Some features may not work correctly, but others will. - - - - - Gets a value indicating whether the instance is complete. - - Whether the instance is complete. - - An instance is complete if it had no errors during install, resume, or repair. - - - - - Gets product-specific properties. - - An of product-specific properties, or null if no properties are defined. - - - - Gets the directory path to the setup engine that installed the instance. - - The directory path to the setup engine that installed the instance. - - - - Information about an instance of a product. - - - You can enumerate all properties of basic types by casting to an . - - - - - Gets the instance identifier (should match the name of the parent instance directory). - - The instance identifier. - - - - Gets the local date and time when the installation was originally installed. - - The local date and time when the installation was originally installed. - - - - Gets the unique name of the installation, often indicating the branch and other information used for telemetry. - - The unique name of the installation, often indicating the branch and other information used for telemetry. - - - - Gets the path to the installation root of the product. - - The path to the installation root of the product. - - - - Gets the version of the product installed in this instance. - - The version of the product installed in this instance. - - - - Gets the display name (title) of the product installed in this instance. - - The LCID for the display name. - The display name (title) of the product installed in this instance. - - - - Gets the description of the product installed in this instance. - - The LCID for the description. - The description of the product installed in this instance. - - - - Resolves the optional relative path to the root path of the instance. - - A relative path within the instance to resolve, or NULL to get the root path. - The full path to the optional relative path within the instance. If the relative path is NULL, the root path will always terminate in a backslash. - - - - Provides localized named properties. - - - - - Gets an array of property names in this property store. - - The LCID for the property names. - An array of property names in this property store. - - - - Gets the value of a named property in this property store. - - The name of the property to get. - The LCID for the property. - The value of the property. - - - - A reference to a package. - - - You can enumerate all properties of basic types by casting to an . - - - - - Gets the general package identifier. - - The general package identifier. - - - - Gets the version of the package. - - The version of the package. - - - - Gets the target process architecture of the package. - - The target process architecture of the package. - - - - Gets the language and optional region identifier. - - The language and optional region identifier. - - - - Gets the build branch of the package. - - The build branch of the package. - - - - Gets the type of the package. - - The type of the package. - - - - Gets the unique identifier consisting of all defined tokens. - - The unique identifier consisting of all defined tokens. - - - - Gets a value indicating whether the package refers to an external extension. - - A value indicating whether the package refers to an external extension. - - - - A reference to a product package. - - - - - Gets the general package identifier. - - The general package identifier. - - - - Gets the version of the package. - - The version of the package. - - - - Gets the target process architecture of the package. - - The target process architecture of the package. - - - - Gets the language and optional region identifier. - - The language and optional region identifier. - - - - Gets the build branch of the package. - - The build branch of the package. - - - - Gets the type of the package. - - The type of the package. - - - - Gets the unique identifier consisting of all defined tokens. - - The unique identifier consisting of all defined tokens. - - - - Gets a value indicating whether the package refers to an external extension. - - A value indicating whether the package refers to an external extension. - - - - Gets a value indicating whether the product package is installed. - - A value indicating whether the product package is installed. - - - - Provides named properties. - - - You can get this from an , , or derivative. - - - - - Gets an array of property names in this property store. - - An array of property names in this property store. - - - - Gets the value of a named property in this property store. - - The name of the property to get. - The value of the property. - - - - The implementation of . - - - - - Class that implements . - - - - diff --git a/Source/Platforms/DotNet/Newtonsoft.Json.dll b/Source/Platforms/DotNet/Newtonsoft.Json.dll index 5008fe379..24741e179 100644 --- a/Source/Platforms/DotNet/Newtonsoft.Json.dll +++ b/Source/Platforms/DotNet/Newtonsoft.Json.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ae7735f3860c48469e742c58db938e07296e64980fe8d41c553611779588ca36 -size 641536 +oid sha256:a94174b6a5aa504aa336d8a3d85d4c7a69f851d60a7c4bf49b68eb359a4561c1 +size 687616 diff --git a/Source/Platforms/DotNet/Newtonsoft.Json.pdb b/Source/Platforms/DotNet/Newtonsoft.Json.pdb index 668e4498d..8ea5b5f0f 100644 --- a/Source/Platforms/DotNet/Newtonsoft.Json.pdb +++ b/Source/Platforms/DotNet/Newtonsoft.Json.pdb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f02fcabf8a74dd70f1dcf9d53c4db95c69f44e236e2a2d1530e54aa4bdfb1cc8 -size 252212 +oid sha256:e081b97f35f2d32ff4a519784641942ca133f32cbe23f04985098c9a42b616af +size 271148 diff --git a/Source/Platforms/DotNet/Newtonsoft.Json.xml b/Source/Platforms/DotNet/Newtonsoft.Json.xml index 316a82975..a09d6e729 100644 --- a/Source/Platforms/DotNet/Newtonsoft.Json.xml +++ b/Source/Platforms/DotNet/Newtonsoft.Json.xml @@ -463,6 +463,70 @@ true if this instance can convert the specified object type; otherwise, false. + + + Converts a F# discriminated union type to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts an Entity Framework to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + Converts an to and from JSON. @@ -643,12 +707,18 @@ true if the written enum text will be camel case; otherwise, false. + + + Gets or sets the naming strategy used to resolve how enum text is written. + + The naming strategy used to resolve how enum text is written. + - Gets or sets a value indicating whether integer values are allowed when deserializing. + Gets or sets a value indicating whether integer values are allowed when serializing and deserializing. The default value is true. - true if integers are allowed when deserializing; otherwise, false. + true if integers are allowed when serializing and deserializing; otherwise, false. @@ -661,6 +731,44 @@ true if the written enum text will be camel case; otherwise, false. + + + Initializes a new instance of the class. + + The naming strategy used to resolve how enum text is written. + true if integers are allowed when serializing and deserializing; otherwise, false. + + + + Initializes a new instance of the class. + + The of the used to write enum text. + + + + Initializes a new instance of the class. + + The of the used to write enum text. + + The parameter list to use when constructing the described by . + If null, the default constructor is used. + When non-null, there must be a constructor defined in the that exactly matches the number, + order, and type of these parameters. + + + + + Initializes a new instance of the class. + + The of the used to write enum text. + + The parameter list to use when constructing the described by . + If null, the default constructor is used. + When non-null, there must be a constructor defined in the that exactly matches the number, + order, and type of these parameters. + + true if integers are allowed when serializing and deserializing; otherwise, false. + Writes the JSON representation of the object. @@ -693,6 +801,32 @@ Converts a to and from Unix epoch time + + + Gets or sets a value indicating whether the dates before Unix epoch + should converted to and from JSON. + + + true to allow converting dates before Unix epoch to and from JSON; + false to throw an exception when a date being converted to or from JSON + occurred before Unix epoch. The default value is false. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + true to allow converting dates before Unix epoch to and from JSON; + false to throw an exception when a date being converted to or from JSON + occurred before Unix epoch. The default value is false. + + Writes the JSON representation of the object. @@ -756,7 +890,7 @@ - Gets or sets a flag to indicate whether to write the Json.NET array attribute. + Gets or sets a value to indicate whether to write the Json.NET array attribute. This attribute helps preserve arrays when converting the written XML back to JSON. true if the array attribute is written to the XML; otherwise, false. @@ -767,6 +901,15 @@ true if the JSON root object is omitted; otherwise, false. + + + Gets or sets a value indicating whether to encode special characters when converting JSON to XML. + If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify + XML namespaces, attributes or processing directives. Instead special characters are encoded and written + as part of the XML element name. + + true if special characters are encoded; otherwise, false. + Writes the JSON representation of the object. @@ -829,12 +972,12 @@ - Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . + Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . - Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . + Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . @@ -863,6 +1006,33 @@ Time zone information should be preserved when converting. + + + The default JSON name table implementation. + + + + + Initializes a new instance of the class. + + + + + Gets a string containing the same characters as the specified range of characters in the given array. + + The character array containing the name to find. + The zero-based index into the array specifying the first character of the name. + The number of characters in the name. + A string containing the same characters as the specified range of characters in the given array. + + + + Adds the specified string into name table. + + The string to add. + This method is not thread-safe. + The resolved string. + Specifies default value handling options for the . @@ -1306,7 +1476,7 @@ Converts the to its JSON string representation. The value to convert. - A JSON string representation of the . + A JSON string representation of the . @@ -1621,11 +1791,30 @@ The JSON string. The name of the root element to append when deserializing. - A flag to indicate whether to write the Json.NET array attribute. + A value to indicate whether to write the Json.NET array attribute. This attribute helps preserve arrays when converting the written XML back to JSON. The deserialized . + + + Deserializes the from a JSON string nested in a root element specified by , + writes a Json.NET array attribute for collections, and encodes special characters. + + The JSON string. + The name of the root element to append when deserializing. + + A value to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + + A value to indicate whether to encode special characters when converting JSON to XML. + If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify + XML namespaces, attributes or processing directives. Instead special characters are encoded and written + as part of the XML element name. + + The deserialized . + Serializes the to a JSON string. @@ -1673,11 +1862,30 @@ The JSON string. The name of the root element to append when deserializing. - A flag to indicate whether to write the Json.NET array attribute. + A value to indicate whether to write the Json.NET array attribute. This attribute helps preserve arrays when converting the written XML back to JSON. The deserialized . + + + Deserializes the from a JSON string nested in a root element specified by , + writes a Json.NET array attribute for collections, and encodes special characters. + + The JSON string. + The name of the root element to append when deserializing. + + A value to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + + A value to indicate whether to encode special characters when converting JSON to XML. + If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify + XML namespaces, attributes or processing directives. Instead special characters are encoded and written + as part of the XML element name. + + The deserialized . + Converts an object to and from JSON. @@ -1906,6 +2114,20 @@ Instructs the not to serialize the public field or public read/write property value. + + + Base class for a table of atomized string objects. + + + + + Gets a string containing the same characters as the specified range of characters in the given array. + + The character array containing the name to find. + The zero-based index into the array specifying the first character of the name. + The number of characters in the name. + A string containing the same characters as the specified range of characters in the given array. + Instructs the how to serialize the object. @@ -1917,6 +2139,12 @@ The member serialization. + + + Gets or sets the missing member handling used when deserializing this object. + + The missing member handling. + Gets or sets how the object's properties with null values are handled during serialization and deserialization. @@ -1955,9 +2183,9 @@ - Gets or sets the used when serializing the property's collection items. + Gets or sets the type used when serializing the property's collection items. - The collection's items . + The collection's items type. @@ -2302,6 +2530,8 @@ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + A null value means there is no maximum. + The default value is 64. @@ -2510,6 +2740,24 @@ The exception thrown when an error occurs during JSON serialization or deserialization. + + + Gets the line number indicating where the error occurred. + + The line number indicating where the error occurred. + + + + Gets the line position indicating where the error occurred. + + The line position indicating where the error occurred. + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + Initializes a new instance of the class. @@ -2539,6 +2787,17 @@ The parameter is null. The class name is null or is zero (0). + + + Initializes a new instance of the class + with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The path to the JSON where the error occurred. + The line number indicating where the error occurred. + The line position indicating where the error occurred. + The exception that is the cause of the current exception, or null if no inner exception is specified. + Serializes and deserializes objects into and from the JSON format. @@ -2580,7 +2839,7 @@ Gets or sets how a type name assembly is written and resolved by the serializer. - The default value is . + The default value is . The type name assembly format. @@ -2714,7 +2973,7 @@ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . A null value means there is no maximum. - The default value is null. + The default value is 64. @@ -2790,14 +3049,14 @@ Populates the JSON values onto the target object. - The that contains the JSON structure to reader values from. + The that contains the JSON structure to read values from. The target object to populate values onto. Populates the JSON values onto the target object. - The that contains the JSON structure to reader values from. + The that contains the JSON structure to read values from. The target object to populate values onto. @@ -2809,7 +3068,7 @@ - Deserializes the JSON structure contained by the specified + Deserializes the JSON structure contained by the specified into an instance of the specified type. The containing the object. @@ -2994,7 +3253,7 @@ Gets or sets how a type name assembly is written and resolved by the serializer. - The default value is . + The default value is . The type name assembly format. @@ -3053,7 +3312,7 @@ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . A null value means there is no maximum. - The default value is null. + The default value is 64. @@ -3120,6 +3379,12 @@ Initializes a new instance of the class. + + + Initializes a new instance of the class + using values copied from the passed in . + + Represents a reader that provides fast, non-cached, forward-only access to JSON text data. @@ -3221,6 +3486,11 @@ The containing the JSON data to read. + + + Gets or sets the reader's property name table. + + Gets or sets the reader's character buffer pool. @@ -4257,7 +4527,7 @@ Represents a reader that provides validation. - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. @@ -5551,6 +5821,26 @@ Load comments as a with type . + + + Specifies how duplicate property names are handled when loading JSON. + + + + + Replace the existing value when there is a duplicate property. The value of the last property in the JSON object will be used. + + + + + Ignore the new value when there is a duplicate property. The value of the first property in the JSON object will be used. + + + + + Throw a when a duplicate property is encountered. + + Contains the LINQ to JSON extension methods. @@ -6317,11 +6607,21 @@ - Gets a the specified name. + Gets a with the specified name. The property name. A with the specified name or null. + + + Gets the with the specified name. + The exact name will be searched for first and if no matching property is found then + the will be used to match a property. + + The property name. + One of the enumeration values that specifies how the strings will be compared. + A matched with the specified name or null. + Gets a of of this object's property values. @@ -6719,6 +7019,25 @@ The reader. An instance of with the content of the reader's current token. + + + Specifies the settings used when cloning JSON. + + + + + Initializes a new instance of the class. + + + + + Gets or sets a flag that indicates whether to copy annotations when cloning a . + The default value is true. + + + A flag that indicates whether to copy annotations when cloning a . + + Specifies the settings used when loading JSON. @@ -6732,20 +7051,34 @@ Gets or sets how JSON comments are handled when loading JSON. + The default value is . The JSON comment handling. Gets or sets how JSON line info is handled when loading JSON. + The default value is . The JSON line info handling. + + + Gets or sets how duplicate property names in JSON objects are handled when loading JSON. + The default value is . + + The JSON duplicate property name handling. + Specifies the settings used when merging JSON. + + + Initializes a new instance of the class. + + Gets or sets the method used when merging JSON arrays. @@ -6758,6 +7091,35 @@ How null value properties are merged. + + + Gets or sets the comparison used to match property names while merging. + The exact property name will be searched for first and if no matching property is found then + the will be used to match a property. + + The comparison used to match property names while merging. + + + + Specifies the settings used when selecting JSON. + + + + + Gets or sets a timeout that will be used when executing regular expressions. + + The timeout that will be used when executing regular expressions. + + + + Gets or sets a flag that indicates whether an error should be thrown if + no tokens are found when evaluating part of the expression. + + + A flag that indicates whether an error should be thrown if + no tokens are found when evaluating part of the expression. + + Represents an abstract JSON token. @@ -6999,6 +7361,10 @@ Returns the indented JSON for this token. + + ToString() returns a non-JSON string value for tokens with a type of . + If you want the JSON for all token types then you should use . + The indented JSON for this token. @@ -7632,42 +7998,62 @@ - Selects a using a JPath expression. Selects the token that matches the object path. + Selects a using a JSONPath expression. Selects the token that matches the object path. - A that contains a JPath expression. + A that contains a JSONPath expression. A , or null. - Selects a using a JPath expression. Selects the token that matches the object path. + Selects a using a JSONPath expression. Selects the token that matches the object path. - A that contains a JPath expression. + A that contains a JSONPath expression. A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. A . - + - Selects a collection of elements using a JPath expression. + Selects a using a JSONPath expression. Selects the token that matches the object path. - A that contains a JPath expression. + A that contains a JSONPath expression. + + The used to select tokens. + A . + + + + Selects a collection of elements using a JSONPath expression. + + + A that contains a JSONPath expression. An of that contains the selected elements. - Selects a collection of elements using a JPath expression. + Selects a collection of elements using a JSONPath expression. - A that contains a JPath expression. + A that contains a JSONPath expression. A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. An of that contains the selected elements. + + + Selects a collection of elements using a JSONPath expression. + + + A that contains a JSONPath expression. + + The used to select tokens. + An of that contains the selected elements. + Returns the responsible for binding operations performed on this object. @@ -7692,6 +8078,13 @@ A new instance of the . + + + Creates a new instance of the . All child tokens are recursively cloned. + + A object to configure cloning settings. + A new instance of the . + Adds an object to the annotation list of this . @@ -7777,6 +8170,13 @@ The token to read from. + + + Initializes a new instance of the class. + + The token to read from. + The initial path of the token. It is prepended to the returned . + Reads the next JSON token from the underlying . @@ -8290,6 +8690,10 @@ Returns a that represents this instance. + + ToString() returns a non-JSON string value for tokens with a type of . + If you want the JSON for all token types then you should use . + A that represents this instance. @@ -8576,7 +8980,7 @@ Contains the JSON schema extension methods. - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. @@ -8586,7 +8990,7 @@ Determines whether the is valid. - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. The source to test. @@ -8601,7 +9005,7 @@ Determines whether the is valid. - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. The source to test. @@ -8617,7 +9021,7 @@ Validates the specified . - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. The source to test. @@ -8629,7 +9033,7 @@ Validates the specified . - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. The source to test. @@ -8642,7 +9046,7 @@ An in-memory representation of a JSON Schema. - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. @@ -8904,7 +9308,7 @@ Returns detailed information about the schema exception. - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. @@ -8961,7 +9365,7 @@ Generates a from a specified . - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. @@ -9014,7 +9418,7 @@ Resolves from an id. - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. @@ -9042,7 +9446,7 @@ The value types allowed by the . - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. @@ -9097,7 +9501,7 @@ Specifies undefined schema Id handling options for the . - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. @@ -9122,7 +9526,7 @@ Returns detailed information related to the . - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. @@ -9150,7 +9554,7 @@ Represents the callback method that will handle JSON schema validation events and the . - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. @@ -9829,6 +10233,13 @@ The converter. + + + Gets the internally resolved for the contract's type. + This converter is used as a fallback converter when no other converter is resolved. + Setting will always override this converter. + + Gets or sets all methods called immediately after deserialization of the object. @@ -9974,6 +10385,12 @@ The member object serialization. + + + Gets or sets the missing member handling used when deserializing this object. + + The missing member handling. + Gets or sets a value that indicates whether the object's properties are required. @@ -10140,6 +10557,11 @@ A value indicating whether this is required. + + + Gets a value indicating whether has a value specified. + + Gets or sets a value indicating whether this property preserves object references. @@ -10302,9 +10724,53 @@ Lookup and create an instance of the type described by the argument. The type to create. - Optional arguments to pass to an initializing constructor of the JsonConverter. + Optional arguments to pass to an initializing constructor of the JsonConverter. If null, the default constructor is used. + + + A kebab case naming strategy. + + + + + Initializes a new instance of the class. + + + A flag indicating whether dictionary keys should be processed. + + + A flag indicating whether explicitly specified property names should be processed, + e.g. a property name customized with a . + + + + + Initializes a new instance of the class. + + + A flag indicating whether dictionary keys should be processed. + + + A flag indicating whether explicitly specified property names should be processed, + e.g. a property name customized with a . + + + A flag indicating whether extension data names should be processed. + + + + + Initializes a new instance of the class. + + + + + Resolves the specified property name. + + The property name to resolve. + The resolved property name. + A base class for resolving how property names and dictionary keys are serialized. @@ -10358,6 +10824,26 @@ The property name to resolve. The resolved property name. + + + Hash code calculation + + + + + + Object equality implementation + + + + + + + Compare to another NamingStrategy + + + + Represents a method that constructs an object. @@ -10604,20 +11090,7 @@ Helper utilities. - - - Compares two objects data. - - The object a. - The object b. - True if both objects are equal, otherwise false. - - - - The custom value comparision callback. - - - + The default implementation of the values comparision function. @@ -10639,15 +11112,6 @@ The member. The underlying type of the member. - - - Determines whether the member is an indexed property. - - The member. - - true if the member is an indexed property; otherwise, false. - - Determines whether the property is an indexed property. diff --git a/Source/Tools/Flax.Build/Build/DotNet/Builder.DotNet.cs b/Source/Tools/Flax.Build/Build/DotNet/Builder.DotNet.cs index eae56e0a4..bf8c16a63 100644 --- a/Source/Tools/Flax.Build/Build/DotNet/Builder.DotNet.cs +++ b/Source/Tools/Flax.Build/Build/DotNet/Builder.DotNet.cs @@ -276,7 +276,7 @@ namespace Flax.Build args.Add("/fullpaths"); args.Add("/filealign:512"); #if USE_NETCORE - args.Add("/langversion:latest"); + args.Add("/langversion:11.0"); args.Add("-nowarn:8632"); // Nullable #else args.Add("/langversion:7.3"); diff --git a/Source/Tools/Flax.Build/Deps/Dependencies/NewtonsoftJson.cs b/Source/Tools/Flax.Build/Deps/Dependencies/NewtonsoftJson.cs index ada5a49a1..bb96659d5 100644 --- a/Source/Tools/Flax.Build/Deps/Dependencies/NewtonsoftJson.cs +++ b/Source/Tools/Flax.Build/Deps/Dependencies/NewtonsoftJson.cs @@ -49,13 +49,13 @@ namespace Flax.Deps.Dependencies "Newtonsoft.Json.pdb", "Newtonsoft.Json.xml", }; - var binFolder = Path.Combine(root, "Src", "Newtonsoft.Json", "bin", configuration, "net45"); + var binFolder = Path.Combine(root, "Src", "Newtonsoft.Json", "bin", configuration, "net7.0"); // Get the source CloneGitRepo(root, "https://github.com/FlaxEngine/Newtonsoft.Json.git"); // Default build - GitCheckout(root, "master"); + GitCheckout(root, "flax-net70"); Deploy.VCEnvironment.BuildSolution(solutionPath, configuration, buildPlatform); foreach (var platform in options.Platforms) { @@ -74,8 +74,8 @@ namespace Flax.Deps.Dependencies } } - // AOT build - GitCheckout(root, "aot"); + // AOT build (disabled codegen) + Utilities.ReplaceInFile(Path.Combine(root, "Src", "Newtonsoft.Json", "Newtonsoft.Json.csproj"), "HAVE_RUNTIME_SERIALIZATION;", ";"); Deploy.VCEnvironment.BuildSolution(solutionPath, configuration, buildPlatform); foreach (var platform in options.Platforms) { diff --git a/Source/Tools/Flax.Build/Flax.Build.csproj b/Source/Tools/Flax.Build/Flax.Build.csproj index e6c5d96c1..6227c8c38 100644 --- a/Source/Tools/Flax.Build/Flax.Build.csproj +++ b/Source/Tools/Flax.Build/Flax.Build.csproj @@ -1,4 +1,4 @@ - + Exe net7.0 @@ -26,8 +26,11 @@ - + + False + ..\..\..\Source\Platforms\DotNet\Newtonsoft.Json.dll + diff --git a/Source/Tools/Flax.Build/Projects/VisualStudio/CSSDKProjectGenerator.cs b/Source/Tools/Flax.Build/Projects/VisualStudio/CSSDKProjectGenerator.cs index f864d2778..5b3c0f722 100644 --- a/Source/Tools/Flax.Build/Projects/VisualStudio/CSSDKProjectGenerator.cs +++ b/Source/Tools/Flax.Build/Projects/VisualStudio/CSSDKProjectGenerator.cs @@ -1,9 +1,5 @@ // Copyright (c) 2012-2022 Wojciech Figat. All rights reserved. -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; using System.Text; namespace Flax.Build.Projects.VisualStudio @@ -87,6 +83,8 @@ namespace Flax.Build.Projects.VisualStudio csProjectFileContent.AppendLine(" $(MSBuildProjectName).CSharp"); // For backwards compatibility, keep the filename same csProjectFileContent.AppendLine(" false"); // Prevents AssemblyInfo.cs generation (causes duplicate attributes) csProjectFileContent.AppendLine(" false"); + csProjectFileContent.AppendLine(" 11.0"); + csProjectFileContent.AppendLine(" 512"); csProjectFileContent.AppendLine(string.Format(" {0}", baseOutputDir)); // This needs to be set here to fix errors in VS csProjectFileContent.AppendLine(string.Format(" {0}", baseIntermediateOutputPath)); // This needs to be set here to fix errors in VS @@ -163,17 +161,6 @@ namespace Flax.Build.Projects.VisualStudio csProjectFileContent.AppendLine(" "); } - // Nuget Package References - // TODO: Support custom Nuget package references - csProjectFileContent.AppendLine(" "); - csProjectFileContent.AppendLine(" "); - csProjectFileContent.AppendLine(" "); - csProjectFileContent.AppendLine(" "); - csProjectFileContent.AppendLine(" "); - csProjectFileContent.AppendLine(" "); - csProjectFileContent.AppendLine(" "); - csProjectFileContent.AppendLine(" "); - // References csProjectFileContent.AppendLine(" ");