Back to Practical Aspnetcore

Json (23)

projects/json/README.md

latest3.9 KB
Original Source

Json (23)

All about the new System.Text.Json namespace.

Writable JSON DOM

Design document for the Writable JSON API

  • Primitives

    This sample shows how to parse and access number, string and an array values from JSON string.

  • Object

    This sample shows how to parse and access objects from JSON string. We will be using JsonObject as well.

  • Finding a node using LINQ

    This sample shows how to find a node based on of its value using LINQ.

  • Finding a node using LINQ 2

    This sample shows how to find a node based on two of its values (a string and an array) using LINQ.

  • Finding a node using LINQ 3

    This sample shows how to find a node based of an absence of a property using LINQ.

  • Finding a node using LINQ 4

    In this example we are trying to find a node in an array that has a specific value on its array property.

  • Construct a JSON document

    This sample shows how to construct a JSON document using JsonObject.

  • Construct a JSON document

    This sample shows how to construct a JSON document using JsonArray.

  • Update a JSON document

    This sample shows how to update properties of a JSON document.

  • Delete elements in a JSON document

    This example shows how to update remove an object property and an element in an array.

  • Add items into a JSON array

    This example shows how to add items at the first position of an array and at the last position.

  • JSON - 23

    Show how to customize serialization using DefaultJsonTypeInfoResolver.

  • JSON - 24

    Customize serialization by writing number as string in JSON for Age values.

  • JSON - 25

    In this case we add one extra timestamp property to the serialization process.

  • JSON - 26

    This sample shows how to detect the type of a JSON property.

dotnet8