{"id":15039399,"url":"https://github.com/tynab/yanlib","last_synced_at":"2025-04-10T00:03:34.128Z","repository":{"id":149365978,"uuid":"589264022","full_name":"Tynab/YANLib","owner":"Tynab","description":"Yami An Nephilim Library","archived":false,"fork":false,"pushed_at":"2025-02-07T09:44:27.000Z","size":5615,"stargazers_count":13,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-14T00:15:29.030Z","etag":null,"topics":["cs","csharp","dll","dot-net","dot-net-6","extension","lib","libraries","library","list","net","nuget","numeric","package","password","random","text","yami-an-nephilim-library","yan-library","yanlib"],"latest_commit_sha":null,"homepage":"https://yanlib.yamiannephilim.com/swagger/index.html","language":"C#","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tynab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"tynab","patreon":"yamiannephilim","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"polar":null,"custom":"paypal.me/yamiannephilim"}},"created_at":"2023-01-15T16:07:24.000Z","updated_at":"2025-01-17T06:19:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"de7e4a00-74f3-4761-8439-dd369af72b1c","html_url":"https://github.com/Tynab/YANLib","commit_stats":{"total_commits":305,"total_committers":2,"mean_commits":152.5,"dds":"0.013114754098360604","last_synced_commit":"a0be39f5bb7230a427808dd896f457f051c8d273"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tynab%2FYANLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tynab%2FYANLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tynab%2FYANLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tynab%2FYANLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tynab","download_url":"https://codeload.github.com/Tynab/YANLib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239084401,"owners_count":19578773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cs","csharp","dll","dot-net","dot-net-6","extension","lib","libraries","library","list","net","nuget","numeric","package","password","random","text","yami-an-nephilim-library","yan-library","yanlib"],"created_at":"2024-09-24T20:42:41.513Z","updated_at":"2025-02-16T03:31:39.630Z","avatar_url":"https://github.com/Tynab.png","language":"C#","funding_links":["https://github.com/sponsors/tynab","https://patreon.com/yamiannephilim","paypal.me/yamiannephilim"],"categories":[],"sub_categories":[],"readme":"# YAMI AN NEPHILIM LIBRARY\nYANLib is based on .NET 6.0 (LTS).\n\n### INSTALL\nhttps://www.nuget.org/packages/Tynab.YANLib\n```\nPM\u003e NuGet\\Install-Package Tynab.YANLib\n```\n\n### EXTENSION\n- Bool\n- Bytes\n- DateTime\n- Enum\n- Enumerable\n- JSON\n- Numeric\n- Text\n- Object\n- Nullable\n- Process\n- Random\n- Task\n\n[See wiki for more details](https://github.com/Tynab/YANLib/wiki)\n\n## JSON\nSystem.Text.Json is a default JSON library integrated in .NET Core and .NET Standard from version 3.0 onwards. It is used to convert .NET objects to JSON format and vice versa, supporting parsing and generating JSON strings.\n\nPreviously, in .NET Framework, Newtonsoft.Json was a popular JSON library used in .NET applications. However, with the introduction of System.Text.Json, .NET Core switched to using this library as the default choice.\n\nSystem.Text.Json is designed to provide better performance and security compared to other JSON libraries. It supports advanced features like parallel parsing and support for new data types such as Span and Utf8JsonReader, enabling faster data processing and reduced memory usage.\n\nRegarding performance, System.Text.Json, Newtonsoft.Json, and Volo.Json are all powerful JSON libraries in .NET, but their performance can vary depending on specific use cases.\n\nHowever, based on performance benchmark tests conducted in different environments and scenarios, System.Text.Json is generally considered to have the best performance among these libraries. For example, according to performance tests, the results show that System.Text.Json has significantly faster JSON-to-.NET object and vice versa conversion times compared to Newtonsoft.Json, especially in cases with large data.\n\n\u003cimg src='pic/1.jpg'\u003e\u003c/img\u003e\n\nHowever, Volo.Json is also a fast and lightweight JSON library designed for optimizing performance and reliability. It is built on new .NET Core data types like Span, Utf8JsonReader, Utf8JsonWriter, which allows for faster data processing and reduced memory usage. In some cases, Volo.Json can provide better performance than System.Text.Json and Newtonsoft.Json.\n\n\u003cb\u003eCase sensitivity when using System.Text.Json Deserialize/Serialize:\u003c/b\u003e\n\nWhen the properties of the object to be serialized to JSON have different capitalization, exceptions can occur when using JSON libraries.\n\nTo address this issue, we can use the optional properties of JSON libraries to customize the property naming in JSON as desired.\n\nHere are some options for configuring performance when using JsonSerializerOptions:\n\n1. Configure JsonSerializerOptions.PropertyNameCaseInsensitive to ensure that the Deserialize process can find properties regardless of their capitalization, not just according to the default case of System.Text.Json.\n2. Use JsonSerializerOptions.IgnoreNullValues to exclude properties with null values during serialization, reducing the size of the generated data and increasing serialization speed.\n3. Use JsonSerializerOptions.WriteIndented to configure the formatting of the serialized result with indentation for easier readability, but it also affects performance.\n4. Use JsonSerializerOptions.MaxDepth to limit the maximum depth of the object being serialized or deserialized, preventing potential memory issues during serialization or deserialization.\n5. Use JsonSerializerOptions.DictionaryKeyPolicy to configure the naming of keys in a Dictionary, helping to reduce the time for serialization and deserialization.\n\n\u003ci\u003eNote:\u003c/i\u003e\n- When using the PropertyNameCaseInsensitive = true and PropertyNamingPolicy = CamelCase attributes in JsonSerializerOptions of System.Text.Json, the Serialize and Deserialize processes are configured to simultaneously support both capitalization styles and CamelCase in property names.\n- However, using these options can affect the performance of the Serialize and Deserialize processes. When PropertyNameCaseInsensitive = true, System.Text.Json needs to search for properties in the object based on case-insensitive names, which adds processing time compared to the default case-sensitive search.\n- To achieve both case-insensitive serialization and deserialization while maintaining application performance, the Tynab.YANLib package can be used.\n\n## TEST\n\nhttps://yanlib.yamiannephilim.com/api/json/yan-vs-standards?quantity=10000\u0026hideSystem=true\n\n\u003cp align='center'\u003e\n\u003cimg src='pic/0.jpg'\u003e\u003c/img\u003e\n\u003c/p\u003e\n\n## CODE DEMO\n```c#\nvar dto = json.Deserialize\u003cJsonDto\u003e();\n```\n\n### NOTE\n\n- Elastic.Apm... (v.1.24.x and above) is spam logs.\n- DotNetCap.CAP... (v.7.x.x and above) is MongoDB error.\n- Do not [Remove Unused References...] in layers:\n    - Host:\n        - Microsoft.EntityFrameworkCore.Tools\n        - DotNetCap.CAP...\n        - Serilog...\n        - Volo.Abp.EntityFrameworkCore.SqlServer\n    - Domain.Shared:\n        - Microsoft.Extensions.FileProviders.Embedded\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftynab%2Fyanlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftynab%2Fyanlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftynab%2Fyanlib/lists"}