TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ekrem Tapan
NA
967
81.7k
Json data parse to model
Jun 4 2018 8:43 PM
hi all,
i have get some terrible with below json data, cannot parse to model, but i dont know why, already created model throug json object, bu still cannot ?
c# code :
//first :
JObject jsonResponse = JObject.Parse(json);
JObject objResponse = (JObject)jsonResponse[
"Item"
];
Dictionary<
string
, JArray> _Data = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<
string
, JArray>>(objResponse.ToString());
//second
var docss = Json.JsonParser.Deserialize<Model.Example>(jsonText);
json format :
{
"s_type"
:
"Document"
,
"s_typeId"
:
"B88C14B99EF449828C5D926E39EE8B89"
,
"s_id"
:
"6D387DF8EA1F460C998F8D28D0FEC76C"
,
"classification"
:
"Documents"
,
"config_id"
: {
"s_keyed_name"
:
"D-180516002"
,
"s_type"
:
"Document"
,
"y_text"
:
"6D387DF8EA1F460C998F8D28D0FEC76C"
},
"created_by_id"
: {
"s_keyed_name"
:
"PM1"
,
"s_type"
:
"User"
,
"y_text"
:
"D01240E9F0BB467587B27BC975AC88FC"
},
"created_on"
:
"2018-05-16T10:05:17"
,
"current_state"
: {
"s_keyed_name"
:
"Preliminary"
,
"s_type"
:
"State"
,
"s_name"
:
"Preliminary"
,
"y_text"
:
"551FC3BA62D54D80A075D14EAAA22561"
},
"generation"
:
"1"
,
"has_change_pending"
:
"0"
,
"has_files"
:
"1"
,
"id"
: {
"s_keyed_name"
:
"16002"
,
"s_type"
:
"Document"
,
"y_text"
:
"6D387DF8EA1F460C998F8D28D0FEC76C"
},
"is_current"
:
"1"
,
"is_released"
:
"0"
,
"is_template"
:
"0"
,
"keyed_name"
:
"16002"
,
"locked_by_id"
: {
"s_keyed_name"
:
"User"
,
"s_type"
:
"User"
,
"y_text"
:
"2A5D1BF097F947AEA2BA2824293761FB"
},
"major_rev"
:
"A"
,
"modified_by_id"
: {
"s_keyed_name"
:
"PM1"
,
"s_type"
:
"User"
,
"y_text"
:
"D01240E9F0BB467587B27BC975AC88FC"
},
"modified_on"
:
"2018-05-16T10:05:17"
,
"name"
:
"FCC2"
,
"new_version"
:
"0"
,
"not_lockable"
:
"0"
,
"permission_id"
: {
"s_keyed_name"
:
"Document 01"
,
"s_type"
:
"Permission"
,
"y_text"
:
"09ABED2EE11246E9875E3E083D91117E"
},
"state"
:
"Preliminary"
,
"team_id"
: {
"s_keyed_name"
:
"HD27"
,
"s_type"
:
"Team"
,
"y_text"
:
"D79F2DCD9A564DCCA235947A52C8A918"
},
"item_number"
:
"D-180516002"
,
"itemtype"
:
"B88C14B99EF449828C5D926E39EE8B89"
,
"Relationships"
: {
"Item"
: {
"s_type"
:
"Document File"
,
"s_typeId"
:
"653C8EE5DDDF4932B75E5CDF04F0CD42"
,
"s_id"
:
"315EE95ADC26472F9E1E1C2D759AE575"
,
"behavior"
:
"float"
,
"config_id"
: {
"s_keyed_name"
:
"315EE95ADC26472F9E1E1C2D759AE575"
,
"s_type"
:
"Document File"
,
"y_text"
:
"315EE95ADC26472F9E1E1C2D759AE575"
},
"created_by_id"
: {
"s_keyed_name"
:
"PM1"
,
"s_type"
:
"User"
,
"y_text"
:
"D01240E9F0BB467587B27BC975AC88FC"
},
"created_on"
:
"2018-05-16T10:05:17"
,
"generation"
:
"1"
,
"id"
: {
"s_keyed_name"
:
"315EE95ADC26472F9E1E1C2D759AE575"
,
"s_type"
:
"Document File"
,
"y_text"
:
"315EE95ADC26472F9E1E1C2D759AE575"
},
"is_current"
:
"1"
,
"is_released"
:
"0"
,
"is_shared"
:
"1"
,
"keyed_name"
:
"315EE95ADC26472F9E1E1C2D759AE575"
,
"major_rev"
:
"A"
,
"modified_by_id"
: {
"s_keyed_name"
:
"PM1"
,
"s_type"
:
"User"
,
"y_text"
:
"D01240E9F0BB467587B27BC975AC88FC"
},
"modified_on"
:
"2018-05-16T10:05:17"
,
"new_version"
:
"1"
,
"not_lockable"
:
"0"
,
"permission_id"
: {
"s_keyed_name"
:
"Document 01"
,
"s_type"
:
"Permission"
,
"y_text"
:
"09ABED2EE11246E9875E3E083D91117E"
},
"related_id"
: {
"s_keyed_name"
:
"test.doc"
,
"s_type"
:
"File"
,
"Item"
: {
"s_type"
:
"File"
,
"s_typeId"
:
"8052A558B9084D41B9F11805E464F443"
,
"s_id"
:
"4BB93E1285BC40588EE318DFA0E46F66"
,
"checkedout_path"
:
""
,
"checksum"
:
"5A1C65804B78C4D0019AAC406B61730A"
,
"config_id"
: {
"s_keyed_name"
:
"test.doc"
,
"s_type"
:
"File"
,
"y_text"
:
"4BB93E1285BC40588EE318DFA0E46F66"
},
"created_by_id"
: {
"s_keyed_name"
:
"M1"
,
"s_type"
:
"User"
,
"y_text"
:
"D01240E9F0BB467587B27BC975AC88FC"
},
"created_on"
:
"2018-05-16T10:05:17"
,
"current_state"
: {
"s_keyed_name"
:
"Released"
,
"s_type"
:
"State"
,
"s_name"
:
"Released"
,
"y_text"
:
"C363ABDADF8D485393BB89877DBDCFD0"
},
"file_size"
:
"53248"
,
"file_type"
: {
"s_keyed_name"
:
"Microsoft Word 97-2003"
,
"s_type"
:
"FileType"
,
"y_text"
:
"642B5CDF908B483690B53CA654EB4892"
},
"generation"
:
"1"
,
"id"
: {
"s_keyed_name"
:
"test.doc"
,
"s_type"
:
"File"
,
"y_text"
:
"4BB93E1285BC40588EE318DFA0E46F66"
},
"is_current"
:
"1"
,
"is_released"
:
"1"
,
"keyed_name"
:
"test.doc"
,
"major_rev"
:
"A"
,
"mimetype"
:
"application/msword"
,
"modified_by_id"
: {
"s_keyed_name"
:
"as1"
,
"s_type"
:
"User"
,
"y_text"
:
"D01240E9F0BB467587B27BC975AC88FC"
},
"modified_on"
:
"2018-05-16T10:05:17"
,
"new_version"
:
"1"
,
"not_lockable"
:
"0"
,
"permission_id"
: {
"s_keyed_name"
:
"File Restriction"
,
"s_type"
:
"Permission"
,
"y_text"
:
"3CA0FD33C589477397D2DBE1BDD855D4"
},
"state"
:
"Released"
,
"filename"
:
"test.doc"
}
},
"sort_order"
:
"1"
,
"source_id"
: {
"s_keyed_name"
:
"16002"
,
"s_type"
:
"Document"
,
"y_text"
:
"6D387DF8EA1F460C998F8D28D0FEC76C"
},
"team_id"
: {
"s_keyed_name"
:
"HD27"
,
"s_type"
:
"Team"
,
"y_text"
:
"D79F2DCD9A564DCCA235947A52C8A918"
},
"itemtype"
:
"653C8EE5DDDF4932B75E5CDF04F0CD42"
}
}
},
error on : line 105
thanks.
Reply
Answers (
1
)
Rotativa select default A3 page size using rotativa
How to Open Menu Links inside Bootstrap Collapse