I am trying to deserialize a complex json that i am getting via an api call. I have 2 questions.
- This is the json that i tried to convert to class on site https://json2csharp.com/json-to-csharp
{
"info": {
"total_count": 2,
"current_page_total_count": 2,
"max_each_page": 500,
"current_page_number": 1,
"total_pages": 1
},
"entity_data": {
"entity_name": "\u05de\u05d0\u05d9\u05e8",
"entity_data_name": "e_130",
"permissions": {
"type": "full",
"code": "1"
},
"view": "data table"
},
"data": [
{
"instance_data": {
"_id": "60a3a82a956ecd3228739ced",
"insertTimestamp": "2021-05-18T14:42:34+0300",
"field_groups": [
{
"field_group_data": {
"group_name": "\u05e1\u05e4\u05e8 \u05d8\u05dc\u05e4\u05d5\u05e0\u05d9\u05dd",
"group_data_name": "g_353",
"group_id": "353",
"repeatable_group": "0",
"permissions": {
"type": "full",
"code": "1"
}
},
"fields_data": [
[
{
"field_name": "\u05e9\u05dd \u05e4\u05e8\u05d8\u05d9",
"field_type_name": "input-text",
"field_data_name": "fld_2372",
"placeholder": null,
"default_value": "",
"act_as_assign": "",
"custom_validation": {
"unable_to_edit": "0",
"data_type": "0"
},
"value": "\u05de\u05d0\u05d9\u05e8",
"group_index": 0
},
{
"field_name": "\u05e9\u05dd \u05de\u05e9\u05e4\u05d7\u05d4",
"field_type_name": "input-text",
"field_data_name": "fld_2373",
"placeholder": null,
"default_value": "",
"act_as_assign": "",
"custom_validation": {
"unable_to_edit": "0",
"data_type": "0"
},
"value": "\u05e8\u05d5\u05d8\u05e4\u05dc\u05d9\u05d9\u05e9",
"group_index": 0
},
{
"field_name": "\u05d9\u05d9\u05e9\u05d5\u05d1 \u05de\u05d2\u05d5\u05e8\u05d9\u05dd",
"field_type_name": "select-list",
"field_data_name": "fld_2374",
"placeholder": null,
"default_value": "",
"possible_values": "[\"\\u05db\\u05e4\\u05e8 \\u05e1\\u05d1\\u05d0\",\"\\u05ea\\u05dc \\u05d0\\u05d1\\u05d9\\u05d1\",\"\\u05e2\\u05d6\\u05d4\",\"\\u05d9\\u05e8\\u05d5\\u05e9\\u05dc\\u05d9\\u05dd\"]",
"act_as_assign": "",
"custom_validation": {
"unable_to_edit": "0",
"alphabetical_order": "0"
},
"value": "\u05db\u05e4\u05e8 \u05e1\u05d1\u05d0",
"group_index": 0
},
{
"field_name": "\u05d8\u05dc\u05e4\u05d5\u05df",
"field_type_name": "input-text",
"field_data_name": "fld_2375",
"placeholder": null,
"default_value": "",
"act_as_assign": "",
"custom_validation": {
"unable_to_edit": "0",
"data_type": "0"
},
"value": "055098393",
"group_index": 0
},
{
"field_name": "\u05de\u05d9\u05d9\u05dc",
"field_type_name": "input-email",
"field_data_name": "fld_2376",
"placeholder": null,
"default_value": "",
"act_as_assign": "",
"custom_validation": {
"unable_to_edit": "0"
},
"value": "meir@arma.co.il",
"group_index": 0
}
]
]
}
]
},
"single_permission": null
},
{
"instance_data": {
"_id": "60a3a7e6788c2124f12b5370",
"insertTimestamp": "2021-05-18T14:41:26+0300",
"field_groups": [
{
"field_group_data": {
"group_name": "\u05e1\u05e4\u05e8 \u05d8\u05dc\u05e4\u05d5\u05e0\u05d9\u05dd",
"group_data_name": "g_353",
"group_id": "353",
"repeatable_group": "0",
"permissions": {
"type": "full",
"code": "1"
}
},
"fields_data": [
[
{
"field_name": "\u05e9\u05dd \u05e4\u05e8\u05d8\u05d9",
"field_type_name": "input-text",
"field_data_name": "fld_2372",
"placeholder": null,
"default_value": "",
"act_as_assign": "",
"custom_validation": {
"unable_to_edit": "0",
"data_type": "0"
},
"value": "\u05d0\u05e8\u05d9\u05d4",
"group_index": 0
},
{
"field_name": "\u05e9\u05dd \u05de\u05e9\u05e4\u05d7\u05d4",
"field_type_name": "input-text",
"field_data_name": "fld_2373",
"placeholder": null,
"default_value": "",
"act_as_assign": "",
"custom_validation": {
"unable_to_edit": "0",
"data_type": "0"
},
"value": "\u05de\u05e6\u05dc\u05d9\u05d7",
"group_index": 0
},
{
"field_name": "\u05d9\u05d9\u05e9\u05d5\u05d1 \u05de\u05d2\u05d5\u05e8\u05d9\u05dd",
"field_type_name": "select-list",
"field_data_name": "fld_2374",
"placeholder": null,
"default_value": "",
"possible_values": "[\"\\u05db\\u05e4\\u05e8 \\u05e1\\u05d1\\u05d0\",\"\\u05ea\\u05dc \\u05d0\\u05d1\\u05d9\\u05d1\",\"\\u05e2\\u05d6\\u05d4\",\"\\u05d9\\u05e8\\u05d5\\u05e9\\u05dc\\u05d9\\u05dd\"]",
"act_as_assign": "",
"custom_validation": {
"unable_to_edit": "0",
"alphabetical_order": "0"
},
"value": "\u05e2\u05d6\u05d4",
"group_index": 0
},
{
"field_name": "\u05d8\u05dc\u05e4\u05d5\u05df",
"field_type_name": "input-text",
"field_data_name": "fld_2375",
"placeholder": null,
"default_value": "",
"act_as_assign": "",
"custom_validation": {
"unable_to_edit": "0",
"data_type": "0"
},
"value": "055098393",
"group_index": 0
},
{
"field_name": "\u05de\u05d9\u05d9\u05dc",
"field_type_name": "input-email",
"field_data_name": "fld_2376",
"placeholder": null,
"default_value": "",
"act_as_assign": "",
"custom_validation": {
"unable_to_edit": "0"
},
"value": "arie@arma.co.il",
"group_index": 0
}
]
]
}
]
},
"single_permission": null
}
]
}
when I put the class into VS i get an error on the following
public class FieldGroup
{
public FieldGroupData field_group_data { get; set; }
public List<List<>> fields_data { get; set; }
}
on List<List<>
Unexpected use of an unbound generic name
- I am at present saving the json to a file how do i deserialize it with the classes generated?