Share Link
Copied to clipboard
Embed on Your Page
Copied to clipboard
We Stand with Ukraine
https://pt.stackoverflow.com/questions/375683/como-criar-fun%C3%A7%C3%B5es-com-hierarquia-ex-consoleerrorwriteline 1 by diegorafaelsouza
Environment version: 4.0.30319.42000
Json.NET version: Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed


Testing JSON: 
{
  "total_events": 3551574,
  "json.appID": [
    {
      "count": 3551024,
      "term": 1
    },
    {
      "count": 256,
      "term": 2
    },
    []                /* <----- I need to ignore this empty array */
  ],
  "unique_field_count": 2
}
Re-serialized result: 
{
  "total_events": 3551574,
  "json.appID": [
    {
      "count": 3551024,
      "term": "1"
    },
    {
      "count": 256,
      "term": "2"
    }
  ],
  "unique_field_count": 2
}

Testing JSON: 
{
  "total_events": 3551574,
  "json.appID": /* Some Comment */ [
    null,
    "bad string",
    101010101,
    {
      "count": 3551024,
      "term": 1
    },
    {
      "count": 256,
      "term": 2
    },
    [],                /* <----- I need to ignore this empty array */
    [1,1,,1,1],
  ],
  "unique_field_count": 2
}
Re-serialized result: 
{
  "total_events": 3551574,
  "json.appID": [
    null,
    {
      "count": 3551024,
      "term": "1"
    },
    {
      "count": 256,
      "term": "2"
    }
  ],
  "unique_field_count": 2
}

Tests passed.
Cached Result
Last Run: 4:55:25 pm
Compile: 0.251s
Execute: 0.232s
Memory: 757.44kb
CPU: 0.297s