For the complete documentation index, see llms.txt. This page is also available as Markdown.

EnforceTypes

This task allows enforcing types in Json documents by giving an array of

Task version: 1.0.1

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Task Parameters

Name
Description

Json : String

The JSON string to be processed.

Default: - Example: {"hello": "123","hello_2": "123.5","world": "true","bad_arr": "hello, world","bad_arr_2": { "prop1": 123 },"good_arr": [ "hello, world" ],"good_arr_2": [ { "prop1": 123 } ]}

Rules : JsonTypeRule[]

JSON data type rules to enforce.

Default: - Example: [{new JsonTypeRule{JsonPath = "hello", DataType = JsonDataType.Number }}, {new JsonTypeRule{JsonPath = "hello_2", DataType = JsonDataType.Number }}]

Task Result

Name
Description

JsonAsString : String

The input json as a string. Example: "{"hello": 123,"hello_2": 123.5,"world": true,"bad_arr": ["hello, world"],"bad_arr_2": [{"prop1": 123}],"good_arr": ["hello, world"],"good_arr_2": [{"prop1": 123}]}"

Task Changelog

Changelog for Task Frends.JSON.EnforceTypes.

[1.0.1] - 2022-11-02

Updated

  • Updated dependency for Newtonsoft.Json from 13.0.1 to 12.0.1

[1.0.0] - 2022-04-05

Added

  • Initial implementation

Last updated

Was this helpful?