DDT.Packages.JsonPicker
1.0.0
See the version list below for details.
dotnet add package DDT.Packages.JsonPicker --version 1.0.0
NuGet\Install-Package DDT.Packages.JsonPicker -Version 1.0.0
<PackageReference Include="DDT.Packages.JsonPicker" Version="1.0.0" />
paket add DDT.Packages.JsonPicker --version 1.0.0
#r "nuget: DDT.Packages.JsonPicker, 1.0.0"
// Install DDT.Packages.JsonPicker as a Cake Addin
#addin nuget:?package=DDT.Packages.JsonPicker&version=1.0.0
// Install DDT.Packages.JsonPicker as a Cake Tool
#tool nuget:?package=DDT.Packages.JsonPicker&version=1.0.0
Description
This tool can be used to pick properties from a json element based on another json element as a reference to what should be picked.
Usage
Regular properties
You don't need to set a value for the property just it's name
Example
Element to pick properties from
{
"name":"ali",
"age":12
}
Lookup json element
{
"age":""
}
Result json element
{
"age":12
}
Object properties
You have to define what properties should be picked from it
Example
Element to pick properties from
{
"name":"ali",
"age":12,
"address":{
"building":13,
"street":"21 jumpstreet",
"city":"cairo",
"country":"Egypt"
}
}
Lookup json element
{
"name":"",
"address":{
"street":"",
"city":"cairo"
}
}
Result json element
{
"name":"ali",
"address":{
"street":"21 jumpstreet",
"city":"cairo"
}
}
Array properties
You have to define what properties should be picked from it's elements
Example
Element to pick properties from
{
"name":"ali",
"age":12,
"books":[
{
"title":"Management for dummies",
"author":"Mahfouz",
"price":341.32
},
{
"title":"Programming for dummies",
"author":"Hany",
"price":32.12
}
]
}
Lookup json element
{
"age":"",
"books":{
"title":"",
"author":"",
}
}
Result json element
{
"age":12,
"books":[
{
"title":"Management for dummies",
"author":"Mahfouz"
},
{
"title":"Programming for dummies",
"author":"Hany"
}
]
}
Depth
You can go as deep as you wish
Example
Element to pick properties from
{
"name":"ali",
"age":12,
"books":[
{
"title":"Management for dummies",
"price":341.32,
"author":{
"name":"Mahfouz",
"age":1000,
"addresses":[
{
"building":13,
"street":"21 jumpstreet",
"city":"cairo",
"country":"Egypt"
}
]
}
},
{
"title":"Programming for dummies",
"price":32.12,
"author":{
"name":"Hany",
"age":152,
"addresses":[
{
"building":16,
"street":"65 jumpstreet",
"city":"Alex",
"country":"USA"
}
]
}
}
]
}
Lookup json element
{
"name": "",
"books": {
"author": {
"name": "",
"addresses": {
"building": "",
"country": ""
}
}
}
}
Result json element
{
"name": "ali",
"books": [
{
"author": {
"name": "Mahfouz",
"addresses": [
{
"building": 13,
"country": "Egypt"
}
]
}
},
{
"author": {
"name": "Hany",
"addresses": [
{
"building": 16,
"country": "USA"
}
]
}
}
]
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.