Home > Net >  DynamicJson type how to judge whether in a json array is empty?
DynamicJson type how to judge whether in a json array is empty?

Time:09-26

 string MSG="{" bids \ ": []}"; 
The dynamic Json=DynamicJson. Parse (MSG);
bids array is not null, normally I Json values. The bids [0] just a matter of, occasionally it will come to an empty array, how to judge whether bids the array is empty, please?

CodePudding user response:

Dynamic resolution cannot have action, will he a traversal can

 
Int ms=0;
Foreach (var item in Json. Bids)
{
Ms++;
break;
}


  •  Tags:  
  • C#
  • Related