[{"data":1,"prerenderedAt":3729},["ShallowReactive",2],{"blog:2022:estimating-json-size":3,"blogMore-Development":3486,"comments-estimating-json-size":3499},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"updated":11,"category":12,"tags":13,"excerpt":16,"body":35,"_type":3478,"_id":3479,"_source":3480,"_file":3481,"_stem":3482,"_extension":3483,"url":3484,"wordCount":3485,"minutes":247,"commentCount":182},"/blog/2022/estimating-json-size","2022",false,"en","Estimating JSON size","I've been working on a system that heavily uses message queuing (RabbitMQ via MassTransit specifically) and occasionally the system needs to deal with large object graphs that need to be processed different - either broken into smaller pieces of work or serialized to an external source and a pointer put into the message instead.","2022-03-22T10:03:00-08:00","2024-07-24","Development",[14,15],".NET","C#",{"type":17,"children":18},"root",[19,26],{"type":20,"tag":21,"props":22,"children":23},"element","p",{},[24],{"type":25,"value":9},"text",{"type":20,"tag":21,"props":27,"children":28},{},[29,31,33],{"type":25,"value":30},"The first idea was to serialize all messages to a ",{"type":25,"value":32},"MemoryStream",{"type":25,"value":34}," but unfortunately this has some limitations, specifically:",{"type":17,"children":36,"toc":3465},[37,41,54,69,74,79,86,91,96,103,121,127,777,783,788,898,904,909,914,927,932,3370,3375,3422,3428,3449,3454,3459],{"type":20,"tag":21,"props":38,"children":39},{},[40],{"type":25,"value":9},{"type":20,"tag":21,"props":42,"children":43},{},[44,45,53],{"type":25,"value":30},{"type":20,"tag":46,"props":47,"children":51},"a",{"href":48,"rel":49},"https://docs.microsoft.com/en-us/dotnet/api/system.io.memorystream?view=net-6.0",[50],"nofollow",[52],{"type":25,"value":32},{"type":25,"value":34},{"type":20,"tag":55,"props":56,"children":57},"ul",{},[58,64],{"type":20,"tag":59,"props":60,"children":61},"li",{},[62],{"type":25,"value":63},"For smaller messages the entire stream is duplicated due to the way the MassTransit interface works",{"type":20,"tag":59,"props":65,"children":66},{},[67],{"type":25,"value":68},"For larger messages a lot of memory is consumed, though only for a short time",{"type":20,"tag":21,"props":70,"children":71},{},[72],{"type":25,"value":73},"For short-lived HTTP requests this is generally not a problem but for long-running message queue processing systems we want to be a bit more careful with GC pressures.",{"type":20,"tag":21,"props":75,"children":76},{},[77],{"type":25,"value":78},"Which led me to two possible solutions.",{"type":20,"tag":80,"props":81,"children":83},"h2",{"id":82},"introducing-lengthonlystream",[84],{"type":25,"value":85},"Introducing LengthOnlyStream",{"type":20,"tag":21,"props":87,"children":88},{},[89],{"type":25,"value":90},"This method is 100% accurate taking into consideration JSON attributes etc. and yet only requires a few bytes of memory.",{"type":20,"tag":21,"props":92,"children":93},{},[94],{"type":25,"value":95},"Basically it involves a new Stream class that does not record what is written merely the length.",{"type":20,"tag":97,"props":98,"children":100},"h3",{"id":99},"pros-cons",[101],{"type":25,"value":102},"Pros & cons",{"type":20,"tag":55,"props":104,"children":105},{},[106,111,116],{"type":20,"tag":59,"props":107,"children":108},{},[109],{"type":25,"value":110},"✔️ 100% accurate",{"type":20,"tag":59,"props":112,"children":113},{},[114],{"type":25,"value":115},"✔️ Can work with non-JSON serialization too",{"type":20,"tag":59,"props":117,"children":118},{},[119],{"type":25,"value":120},"❌ Still goes through the whole serialization process",{"type":20,"tag":97,"props":122,"children":124},{"id":123},"source",[125],{"type":25,"value":126},"Source",{"type":20,"tag":128,"props":129,"children":134},"pre",{"className":130,"code":131,"language":132,"meta":133,"style":133},"language-csharp shiki shiki-themes everforest-light dracula","internal class LengthOnlyStream : Stream {\n    long length;\n\n    public override bool CanRead => false;\n    public override bool CanSeek => false;\n    public override bool CanWrite => true;\n    public override long Length => length;\n    public override long Position { get; set; }\n    public override void Flush() { }\n    public override int Read(byte[] buffer, int offset, int count) => throw new NotImplementedException();\n    public void Reset() => length = 0;\n    public override long Seek(long offset, SeekOrigin origin) => 0;\n    public override void SetLength(long value) => length = value;\n    public override void Write(byte[] buffer, int offset, int count) => length += count - offset;\n}\n","csharp","",[135],{"type":20,"tag":136,"props":137,"children":138},"code",{"__ignoreMap":133},[139,180,195,205,245,278,312,342,383,411,511,556,620,675,768],{"type":20,"tag":140,"props":141,"children":144},"span",{"class":142,"line":143},"line",1,[145,151,157,163,169,175],{"type":20,"tag":140,"props":146,"children":148},{"style":147},"--shiki-default:#F57D26;--shiki-dark:#FF79C6",[149],{"type":25,"value":150},"internal",{"type":20,"tag":140,"props":152,"children":154},{"style":153},"--shiki-default:#F85552;--shiki-dark:#FF79C6",[155],{"type":25,"value":156}," class",{"type":20,"tag":140,"props":158,"children":160},{"style":159},"--shiki-default:#3A94C5;--shiki-dark:#8BE9FD",[161],{"type":25,"value":162}," LengthOnlyStream",{"type":20,"tag":140,"props":164,"children":166},{"style":165},"--shiki-default:#5C6A72;--shiki-dark:#F8F8F2",[167],{"type":25,"value":168}," : ",{"type":20,"tag":140,"props":170,"children":172},{"style":171},"--shiki-default:#3A94C5;--shiki-default-font-style:inherit;--shiki-dark:#8BE9FD;--shiki-dark-font-style:italic",[173],{"type":25,"value":174},"Stream",{"type":20,"tag":140,"props":176,"children":177},{"style":165},[178],{"type":25,"value":179}," {\n",{"type":20,"tag":140,"props":181,"children":183},{"class":142,"line":182},2,[184,190],{"type":20,"tag":140,"props":185,"children":187},{"style":186},"--shiki-default:#3A94C5;--shiki-dark:#FF79C6",[188],{"type":25,"value":189},"    long",{"type":20,"tag":140,"props":191,"children":192},{"style":165},[193],{"type":25,"value":194}," length;\n",{"type":20,"tag":140,"props":196,"children":198},{"class":142,"line":197},3,[199],{"type":20,"tag":140,"props":200,"children":202},{"emptyLinePlaceholder":201},true,[203],{"type":25,"value":204},"\n",{"type":20,"tag":140,"props":206,"children":208},{"class":142,"line":207},4,[209,214,219,224,229,234,240],{"type":20,"tag":140,"props":210,"children":211},{"style":147},[212],{"type":25,"value":213},"    public",{"type":20,"tag":140,"props":215,"children":216},{"style":147},[217],{"type":25,"value":218}," override",{"type":20,"tag":140,"props":220,"children":221},{"style":186},[222],{"type":25,"value":223}," bool",{"type":20,"tag":140,"props":225,"children":226},{"style":165},[227],{"type":25,"value":228}," CanRead ",{"type":20,"tag":140,"props":230,"children":231},{"style":147},[232],{"type":25,"value":233},"=>",{"type":20,"tag":140,"props":235,"children":237},{"style":236},"--shiki-default:#DF69BA;--shiki-dark:#BD93F9",[238],{"type":25,"value":239}," false",{"type":20,"tag":140,"props":241,"children":242},{"style":165},[243],{"type":25,"value":244},";\n",{"type":20,"tag":140,"props":246,"children":248},{"class":142,"line":247},5,[249,253,257,261,266,270,274],{"type":20,"tag":140,"props":250,"children":251},{"style":147},[252],{"type":25,"value":213},{"type":20,"tag":140,"props":254,"children":255},{"style":147},[256],{"type":25,"value":218},{"type":20,"tag":140,"props":258,"children":259},{"style":186},[260],{"type":25,"value":223},{"type":20,"tag":140,"props":262,"children":263},{"style":165},[264],{"type":25,"value":265}," CanSeek ",{"type":20,"tag":140,"props":267,"children":268},{"style":147},[269],{"type":25,"value":233},{"type":20,"tag":140,"props":271,"children":272},{"style":236},[273],{"type":25,"value":239},{"type":20,"tag":140,"props":275,"children":276},{"style":165},[277],{"type":25,"value":244},{"type":20,"tag":140,"props":279,"children":281},{"class":142,"line":280},6,[282,286,290,294,299,303,308],{"type":20,"tag":140,"props":283,"children":284},{"style":147},[285],{"type":25,"value":213},{"type":20,"tag":140,"props":287,"children":288},{"style":147},[289],{"type":25,"value":218},{"type":20,"tag":140,"props":291,"children":292},{"style":186},[293],{"type":25,"value":223},{"type":20,"tag":140,"props":295,"children":296},{"style":165},[297],{"type":25,"value":298}," CanWrite ",{"type":20,"tag":140,"props":300,"children":301},{"style":147},[302],{"type":25,"value":233},{"type":20,"tag":140,"props":304,"children":305},{"style":236},[306],{"type":25,"value":307}," true",{"type":20,"tag":140,"props":309,"children":310},{"style":165},[311],{"type":25,"value":244},{"type":20,"tag":140,"props":313,"children":315},{"class":142,"line":314},7,[316,320,324,329,334,338],{"type":20,"tag":140,"props":317,"children":318},{"style":147},[319],{"type":25,"value":213},{"type":20,"tag":140,"props":321,"children":322},{"style":147},[323],{"type":25,"value":218},{"type":20,"tag":140,"props":325,"children":326},{"style":186},[327],{"type":25,"value":328}," long",{"type":20,"tag":140,"props":330,"children":331},{"style":165},[332],{"type":25,"value":333}," Length ",{"type":20,"tag":140,"props":335,"children":336},{"style":147},[337],{"type":25,"value":233},{"type":20,"tag":140,"props":339,"children":340},{"style":165},[341],{"type":25,"value":194},{"type":20,"tag":140,"props":343,"children":345},{"class":142,"line":344},8,[346,350,354,358,363,368,373,378],{"type":20,"tag":140,"props":347,"children":348},{"style":147},[349],{"type":25,"value":213},{"type":20,"tag":140,"props":351,"children":352},{"style":147},[353],{"type":25,"value":218},{"type":20,"tag":140,"props":355,"children":356},{"style":186},[357],{"type":25,"value":328},{"type":20,"tag":140,"props":359,"children":360},{"style":165},[361],{"type":25,"value":362}," Position { ",{"type":20,"tag":140,"props":364,"children":365},{"style":186},[366],{"type":25,"value":367},"get",{"type":20,"tag":140,"props":369,"children":370},{"style":165},[371],{"type":25,"value":372},"; ",{"type":20,"tag":140,"props":374,"children":375},{"style":186},[376],{"type":25,"value":377},"set",{"type":20,"tag":140,"props":379,"children":380},{"style":165},[381],{"type":25,"value":382},"; }\n",{"type":20,"tag":140,"props":384,"children":386},{"class":142,"line":385},9,[387,391,395,400,406],{"type":20,"tag":140,"props":388,"children":389},{"style":147},[390],{"type":25,"value":213},{"type":20,"tag":140,"props":392,"children":393},{"style":147},[394],{"type":25,"value":218},{"type":20,"tag":140,"props":396,"children":397},{"style":186},[398],{"type":25,"value":399}," void",{"type":20,"tag":140,"props":401,"children":403},{"style":402},"--shiki-default:#8DA101;--shiki-dark:#50FA7B",[404],{"type":25,"value":405}," Flush",{"type":20,"tag":140,"props":407,"children":408},{"style":165},[409],{"type":25,"value":410},"() { }\n",{"type":20,"tag":140,"props":412,"children":414},{"class":142,"line":413},10,[415,419,423,428,433,438,443,448,454,459,464,469,473,477,482,487,491,496,501,506],{"type":20,"tag":140,"props":416,"children":417},{"style":147},[418],{"type":25,"value":213},{"type":20,"tag":140,"props":420,"children":421},{"style":147},[422],{"type":25,"value":218},{"type":20,"tag":140,"props":424,"children":425},{"style":186},[426],{"type":25,"value":427}," int",{"type":20,"tag":140,"props":429,"children":430},{"style":402},[431],{"type":25,"value":432}," Read",{"type":20,"tag":140,"props":434,"children":435},{"style":165},[436],{"type":25,"value":437},"(",{"type":20,"tag":140,"props":439,"children":440},{"style":186},[441],{"type":25,"value":442},"byte",{"type":20,"tag":140,"props":444,"children":445},{"style":165},[446],{"type":25,"value":447},"[] ",{"type":20,"tag":140,"props":449,"children":451},{"style":450},"--shiki-default:#5C6A72;--shiki-default-font-style:inherit;--shiki-dark:#FFB86C;--shiki-dark-font-style:italic",[452],{"type":25,"value":453},"buffer",{"type":20,"tag":140,"props":455,"children":456},{"style":165},[457],{"type":25,"value":458},", ",{"type":20,"tag":140,"props":460,"children":461},{"style":186},[462],{"type":25,"value":463},"int",{"type":20,"tag":140,"props":465,"children":466},{"style":450},[467],{"type":25,"value":468}," offset",{"type":20,"tag":140,"props":470,"children":471},{"style":165},[472],{"type":25,"value":458},{"type":20,"tag":140,"props":474,"children":475},{"style":186},[476],{"type":25,"value":463},{"type":20,"tag":140,"props":478,"children":479},{"style":450},[480],{"type":25,"value":481}," count",{"type":20,"tag":140,"props":483,"children":484},{"style":165},[485],{"type":25,"value":486},") ",{"type":20,"tag":140,"props":488,"children":489},{"style":147},[490],{"type":25,"value":233},{"type":20,"tag":140,"props":492,"children":493},{"style":153},[494],{"type":25,"value":495}," throw",{"type":20,"tag":140,"props":497,"children":498},{"style":153},[499],{"type":25,"value":500}," new",{"type":20,"tag":140,"props":502,"children":503},{"style":171},[504],{"type":25,"value":505}," NotImplementedException",{"type":20,"tag":140,"props":507,"children":508},{"style":165},[509],{"type":25,"value":510},"();\n",{"type":20,"tag":140,"props":512,"children":514},{"class":142,"line":513},11,[515,519,523,528,533,537,542,547,552],{"type":20,"tag":140,"props":516,"children":517},{"style":147},[518],{"type":25,"value":213},{"type":20,"tag":140,"props":520,"children":521},{"style":186},[522],{"type":25,"value":399},{"type":20,"tag":140,"props":524,"children":525},{"style":402},[526],{"type":25,"value":527}," Reset",{"type":20,"tag":140,"props":529,"children":530},{"style":165},[531],{"type":25,"value":532},"() ",{"type":20,"tag":140,"props":534,"children":535},{"style":147},[536],{"type":25,"value":233},{"type":20,"tag":140,"props":538,"children":539},{"style":165},[540],{"type":25,"value":541}," length ",{"type":20,"tag":140,"props":543,"children":544},{"style":147},[545],{"type":25,"value":546},"=",{"type":20,"tag":140,"props":548,"children":549},{"style":236},[550],{"type":25,"value":551}," 0",{"type":20,"tag":140,"props":553,"children":554},{"style":165},[555],{"type":25,"value":244},{"type":20,"tag":140,"props":557,"children":559},{"class":142,"line":558},12,[560,564,568,572,577,581,586,590,594,599,604,608,612,616],{"type":20,"tag":140,"props":561,"children":562},{"style":147},[563],{"type":25,"value":213},{"type":20,"tag":140,"props":565,"children":566},{"style":147},[567],{"type":25,"value":218},{"type":20,"tag":140,"props":569,"children":570},{"style":186},[571],{"type":25,"value":328},{"type":20,"tag":140,"props":573,"children":574},{"style":402},[575],{"type":25,"value":576}," Seek",{"type":20,"tag":140,"props":578,"children":579},{"style":165},[580],{"type":25,"value":437},{"type":20,"tag":140,"props":582,"children":583},{"style":186},[584],{"type":25,"value":585},"long",{"type":20,"tag":140,"props":587,"children":588},{"style":450},[589],{"type":25,"value":468},{"type":20,"tag":140,"props":591,"children":592},{"style":165},[593],{"type":25,"value":458},{"type":20,"tag":140,"props":595,"children":596},{"style":171},[597],{"type":25,"value":598},"SeekOrigin",{"type":20,"tag":140,"props":600,"children":601},{"style":450},[602],{"type":25,"value":603}," origin",{"type":20,"tag":140,"props":605,"children":606},{"style":165},[607],{"type":25,"value":486},{"type":20,"tag":140,"props":609,"children":610},{"style":147},[611],{"type":25,"value":233},{"type":20,"tag":140,"props":613,"children":614},{"style":236},[615],{"type":25,"value":551},{"type":20,"tag":140,"props":617,"children":618},{"style":165},[619],{"type":25,"value":244},{"type":20,"tag":140,"props":621,"children":623},{"class":142,"line":622},13,[624,628,632,636,641,645,649,654,658,662,666,670],{"type":20,"tag":140,"props":625,"children":626},{"style":147},[627],{"type":25,"value":213},{"type":20,"tag":140,"props":629,"children":630},{"style":147},[631],{"type":25,"value":218},{"type":20,"tag":140,"props":633,"children":634},{"style":186},[635],{"type":25,"value":399},{"type":20,"tag":140,"props":637,"children":638},{"style":402},[639],{"type":25,"value":640}," SetLength",{"type":20,"tag":140,"props":642,"children":643},{"style":165},[644],{"type":25,"value":437},{"type":20,"tag":140,"props":646,"children":647},{"style":186},[648],{"type":25,"value":585},{"type":20,"tag":140,"props":650,"children":651},{"style":450},[652],{"type":25,"value":653}," value",{"type":20,"tag":140,"props":655,"children":656},{"style":165},[657],{"type":25,"value":486},{"type":20,"tag":140,"props":659,"children":660},{"style":147},[661],{"type":25,"value":233},{"type":20,"tag":140,"props":663,"children":664},{"style":165},[665],{"type":25,"value":541},{"type":20,"tag":140,"props":667,"children":668},{"style":147},[669],{"type":25,"value":546},{"type":20,"tag":140,"props":671,"children":672},{"style":165},[673],{"type":25,"value":674}," value;\n",{"type":20,"tag":140,"props":676,"children":678},{"class":142,"line":677},14,[679,683,687,691,696,700,704,708,712,716,720,724,728,732,736,740,744,748,753,758,763],{"type":20,"tag":140,"props":680,"children":681},{"style":147},[682],{"type":25,"value":213},{"type":20,"tag":140,"props":684,"children":685},{"style":147},[686],{"type":25,"value":218},{"type":20,"tag":140,"props":688,"children":689},{"style":186},[690],{"type":25,"value":399},{"type":20,"tag":140,"props":692,"children":693},{"style":402},[694],{"type":25,"value":695}," Write",{"type":20,"tag":140,"props":697,"children":698},{"style":165},[699],{"type":25,"value":437},{"type":20,"tag":140,"props":701,"children":702},{"style":186},[703],{"type":25,"value":442},{"type":20,"tag":140,"props":705,"children":706},{"style":165},[707],{"type":25,"value":447},{"type":20,"tag":140,"props":709,"children":710},{"style":450},[711],{"type":25,"value":453},{"type":20,"tag":140,"props":713,"children":714},{"style":165},[715],{"type":25,"value":458},{"type":20,"tag":140,"props":717,"children":718},{"style":186},[719],{"type":25,"value":463},{"type":20,"tag":140,"props":721,"children":722},{"style":450},[723],{"type":25,"value":468},{"type":20,"tag":140,"props":725,"children":726},{"style":165},[727],{"type":25,"value":458},{"type":20,"tag":140,"props":729,"children":730},{"style":186},[731],{"type":25,"value":463},{"type":20,"tag":140,"props":733,"children":734},{"style":450},[735],{"type":25,"value":481},{"type":20,"tag":140,"props":737,"children":738},{"style":165},[739],{"type":25,"value":486},{"type":20,"tag":140,"props":741,"children":742},{"style":147},[743],{"type":25,"value":233},{"type":20,"tag":140,"props":745,"children":746},{"style":165},[747],{"type":25,"value":541},{"type":20,"tag":140,"props":749,"children":750},{"style":147},[751],{"type":25,"value":752},"+=",{"type":20,"tag":140,"props":754,"children":755},{"style":165},[756],{"type":25,"value":757}," count ",{"type":20,"tag":140,"props":759,"children":760},{"style":147},[761],{"type":25,"value":762},"-",{"type":20,"tag":140,"props":764,"children":765},{"style":165},[766],{"type":25,"value":767}," offset;\n",{"type":20,"tag":140,"props":769,"children":771},{"class":142,"line":770},15,[772],{"type":20,"tag":140,"props":773,"children":774},{"style":165},[775],{"type":25,"value":776},"}\n",{"type":20,"tag":97,"props":778,"children":780},{"id":779},"usage",[781],{"type":25,"value":782},"Usage",{"type":20,"tag":21,"props":784,"children":785},{},[786],{"type":25,"value":787},"You can now get the actual serialized size with:",{"type":20,"tag":128,"props":789,"children":791},{"className":130,"code":790,"language":132,"meta":133,"style":133},"using var countStream = new LengthOnlyStream();\nJsonSerializer.Serialize(countStream, damien, typeof(Person), options);\nvar size = countStream.Length;\n",[792],{"type":20,"tag":136,"props":793,"children":794},{"__ignoreMap":133},[795,829,866],{"type":20,"tag":140,"props":796,"children":797},{"class":142,"line":143},[798,803,808,813,817,821,825],{"type":20,"tag":140,"props":799,"children":800},{"style":153},[801],{"type":25,"value":802},"using",{"type":20,"tag":140,"props":804,"children":805},{"style":186},[806],{"type":25,"value":807}," var",{"type":20,"tag":140,"props":809,"children":810},{"style":165},[811],{"type":25,"value":812}," countStream ",{"type":20,"tag":140,"props":814,"children":815},{"style":147},[816],{"type":25,"value":546},{"type":20,"tag":140,"props":818,"children":819},{"style":153},[820],{"type":25,"value":500},{"type":20,"tag":140,"props":822,"children":823},{"style":171},[824],{"type":25,"value":162},{"type":20,"tag":140,"props":826,"children":827},{"style":165},[828],{"type":25,"value":510},{"type":20,"tag":140,"props":830,"children":831},{"class":142,"line":182},[832,837,842,847,852,856,861],{"type":20,"tag":140,"props":833,"children":834},{"style":165},[835],{"type":25,"value":836},"JsonSerializer.",{"type":20,"tag":140,"props":838,"children":839},{"style":402},[840],{"type":25,"value":841},"Serialize",{"type":20,"tag":140,"props":843,"children":844},{"style":165},[845],{"type":25,"value":846},"(countStream, damien, ",{"type":20,"tag":140,"props":848,"children":849},{"style":153},[850],{"type":25,"value":851},"typeof",{"type":20,"tag":140,"props":853,"children":854},{"style":165},[855],{"type":25,"value":437},{"type":20,"tag":140,"props":857,"children":858},{"style":171},[859],{"type":25,"value":860},"Person",{"type":20,"tag":140,"props":862,"children":863},{"style":165},[864],{"type":25,"value":865},"), options);\n",{"type":20,"tag":140,"props":867,"children":868},{"class":142,"line":197},[869,874,879,883,888,894],{"type":20,"tag":140,"props":870,"children":871},{"style":186},[872],{"type":25,"value":873},"var",{"type":20,"tag":140,"props":875,"children":876},{"style":165},[877],{"type":25,"value":878}," size ",{"type":20,"tag":140,"props":880,"children":881},{"style":147},[882],{"type":25,"value":546},{"type":20,"tag":140,"props":884,"children":885},{"style":165},[886],{"type":25,"value":887}," countStream.",{"type":20,"tag":140,"props":889,"children":891},{"style":890},"--shiki-default:#35A77C;--shiki-dark:#F8F8F2",[892],{"type":25,"value":893},"Length",{"type":20,"tag":140,"props":895,"children":896},{"style":165},[897],{"type":25,"value":244},{"type":20,"tag":80,"props":899,"children":901},{"id":900},"introducing-jsonestimator",[902],{"type":25,"value":903},"Introducing JsonEstimator",{"type":20,"tag":21,"props":905,"children":906},{},[907],{"type":25,"value":908},"In our particular case we don't need to be 100% accurate and instead would like to minimize the amount of work done as the trade-off. This is where JsonEstimator comes into play:",{"type":20,"tag":97,"props":910,"children":912},{"id":911},"pros-cons-1",[913],{"type":25,"value":102},{"type":20,"tag":55,"props":915,"children":916},{},[917,922],{"type":20,"tag":59,"props":918,"children":919},{},[920],{"type":25,"value":921},"❌ Not 100% accurate (ignores Json attributes)",{"type":20,"tag":59,"props":923,"children":924},{},[925],{"type":25,"value":926},"✔️ Fast and efficient",{"type":20,"tag":97,"props":928,"children":930},{"id":929},"source-1",[931],{"type":25,"value":126},{"type":20,"tag":128,"props":933,"children":935},{"className":130,"code":934,"language":132,"meta":133,"style":133},"public static class JsonEstimator\n{\n    public static long Estimate(object obj, bool includeNulls) {\n        if (obj is null) return 4;\n        if (obj is Byte || obj is SByte) return 1;\n        if (obj is Char) return 3;\n        if (obj is Boolean b) return b ? 4 : 5;\n        if (obj is Guid) return 38;\n        if (obj is DateTime || obj is DateTimeOffset) return 35;\n        if (obj is Int16 i16) return i16.ToString(CultureInfo.InvariantCulture).Length;\n        if (obj is Int32 i32) return i32.ToString(CultureInfo.InvariantCulture).Length;\n        if (obj is Int64 i64) return i64.ToString(CultureInfo.InvariantCulture).Length;\n        if (obj is UInt16 u16) return u16.ToString(CultureInfo.InvariantCulture).Length;\n        if (obj is UInt32 u32) return u32.ToString(CultureInfo.InvariantCulture).Length;\n        if (obj is UInt64 u64) return u64.ToString(CultureInfo.InvariantCulture).Length;\n        if (obj is String s) return s.Length + 2;\n        if (obj is Decimal dec) return dec.ToString(CultureInfo.InvariantCulture).Length;\n        if (obj is Double dou) return dou.ToString(CultureInfo.InvariantCulture).Length;\n        if (obj is Single sin) return sin.ToString(CultureInfo.InvariantCulture).Length;\n        if (obj is IDictionary dict) return EstimateDictionary(dict, includeNulls);\n        if (obj is IEnumerable enumerable) return EstimateEnumerable(enumerable, includeNulls);\n\n        return EstimateObject(obj, includeNulls);\n    }\n\n    static long EstimateEnumerable(IEnumerable enumerable, bool includeNulls) {\n        long size = 0;\n        foreach (var item in enumerable)\n            size += Estimate(item, includeNulls) + 1; // ,\n        return size > 0 ? size + 1 : 2;\n    }\n\n    static readonly BindingFlags publicInstance = BindingFlags.Instance | BindingFlags.Public;\n\n    static long EstimateDictionary(IDictionary dictionary, bool includeNulls) {\n        long size = 2; // { }\n        bool wasFirst = true;\n        foreach (var key in dictionary.Keys) {\n            var value = dictionary[key];\n            if (includeNulls || value != null) {\n                if (!wasFirst)\n                    size++;\n                else\n                    wasFirst = false;\n                size += Estimate(key, includeNulls) + 1 + Estimate(value, includeNulls); // :,\n            }\n        }\n        return size;\n    }\n\n    static long EstimateObject(object obj, bool includeNulls) {\n        long size = 2;\n        bool wasFirst = true;\n        var type = obj.GetType();\n        var properties = type.GetProperties(publicInstance);\n        foreach (var property in properties) {\n            if (property.CanRead && property.CanWrite) {\n                var value = property.GetValue(obj);\n                if (includeNulls || value != null) {\n                    if (!wasFirst)\n                        size++;\n                    else\n                        wasFirst = false;\n                    size += property.Name.Length + 3 + Estimate(value, includeNulls);\n                }\n            }\n        }\n\n        var fields = type.GetFields(publicInstance);\n        foreach (var field in fields) {\n            var value = field.GetValue(obj);\n            if (includeNulls || value != null) {\n                if (!wasFirst)\n                    size++;\n                else\n                    wasFirst = false;\n                size += field.Name.Length + 3 + Estimate(value, includeNulls);\n            }\n        }\n        return size;\n    }\n}\n",[936],{"type":20,"tag":136,"props":937,"children":938},{"__ignoreMap":133},[939,961,969,1022,1063,1119,1156,1213,1250,1304,1366,1424,1482,1540,1598,1656,1709,1768,1827,1886,1926,1966,1974,1993,2002,2010,2057,2082,2115,2156,2206,2214,2222,2277,2285,2331,2360,2386,2425,2452,2488,2511,2529,2538,2559,2607,2616,2625,2638,2646,2654,2698,2722,2746,2778,2810,2840,2877,2908,2940,2961,2978,2987,3008,3060,3069,3077,3085,3093,3123,3153,3182,3214,3234,3250,3258,3278,3326,3334,3342,3354,3362],{"type":20,"tag":140,"props":940,"children":941},{"class":142,"line":143},[942,947,952,956],{"type":20,"tag":140,"props":943,"children":944},{"style":147},[945],{"type":25,"value":946},"public",{"type":20,"tag":140,"props":948,"children":949},{"style":147},[950],{"type":25,"value":951}," static",{"type":20,"tag":140,"props":953,"children":954},{"style":153},[955],{"type":25,"value":156},{"type":20,"tag":140,"props":957,"children":958},{"style":159},[959],{"type":25,"value":960}," JsonEstimator\n",{"type":20,"tag":140,"props":962,"children":963},{"class":142,"line":182},[964],{"type":20,"tag":140,"props":965,"children":966},{"style":165},[967],{"type":25,"value":968},"{\n",{"type":20,"tag":140,"props":970,"children":971},{"class":142,"line":197},[972,976,980,984,989,993,998,1003,1007,1012,1017],{"type":20,"tag":140,"props":973,"children":974},{"style":147},[975],{"type":25,"value":213},{"type":20,"tag":140,"props":977,"children":978},{"style":147},[979],{"type":25,"value":951},{"type":20,"tag":140,"props":981,"children":982},{"style":186},[983],{"type":25,"value":328},{"type":20,"tag":140,"props":985,"children":986},{"style":402},[987],{"type":25,"value":988}," Estimate",{"type":20,"tag":140,"props":990,"children":991},{"style":165},[992],{"type":25,"value":437},{"type":20,"tag":140,"props":994,"children":995},{"style":186},[996],{"type":25,"value":997},"object",{"type":20,"tag":140,"props":999,"children":1000},{"style":450},[1001],{"type":25,"value":1002}," obj",{"type":20,"tag":140,"props":1004,"children":1005},{"style":165},[1006],{"type":25,"value":458},{"type":20,"tag":140,"props":1008,"children":1009},{"style":186},[1010],{"type":25,"value":1011},"bool",{"type":20,"tag":140,"props":1013,"children":1014},{"style":450},[1015],{"type":25,"value":1016}," includeNulls",{"type":20,"tag":140,"props":1018,"children":1019},{"style":165},[1020],{"type":25,"value":1021},") {\n",{"type":20,"tag":140,"props":1023,"children":1024},{"class":142,"line":207},[1025,1030,1035,1040,1045,1049,1054,1059],{"type":20,"tag":140,"props":1026,"children":1027},{"style":153},[1028],{"type":25,"value":1029},"        if",{"type":20,"tag":140,"props":1031,"children":1032},{"style":165},[1033],{"type":25,"value":1034}," (obj ",{"type":20,"tag":140,"props":1036,"children":1037},{"style":153},[1038],{"type":25,"value":1039},"is",{"type":20,"tag":140,"props":1041,"children":1042},{"style":236},[1043],{"type":25,"value":1044}," null",{"type":20,"tag":140,"props":1046,"children":1047},{"style":165},[1048],{"type":25,"value":486},{"type":20,"tag":140,"props":1050,"children":1051},{"style":153},[1052],{"type":25,"value":1053},"return",{"type":20,"tag":140,"props":1055,"children":1056},{"style":236},[1057],{"type":25,"value":1058}," 4",{"type":20,"tag":140,"props":1060,"children":1061},{"style":165},[1062],{"type":25,"value":244},{"type":20,"tag":140,"props":1064,"children":1065},{"class":142,"line":247},[1066,1070,1074,1078,1083,1088,1093,1097,1102,1106,1110,1115],{"type":20,"tag":140,"props":1067,"children":1068},{"style":153},[1069],{"type":25,"value":1029},{"type":20,"tag":140,"props":1071,"children":1072},{"style":165},[1073],{"type":25,"value":1034},{"type":20,"tag":140,"props":1075,"children":1076},{"style":153},[1077],{"type":25,"value":1039},{"type":20,"tag":140,"props":1079,"children":1080},{"style":171},[1081],{"type":25,"value":1082}," Byte",{"type":20,"tag":140,"props":1084,"children":1085},{"style":147},[1086],{"type":25,"value":1087}," ||",{"type":20,"tag":140,"props":1089,"children":1090},{"style":165},[1091],{"type":25,"value":1092}," obj ",{"type":20,"tag":140,"props":1094,"children":1095},{"style":153},[1096],{"type":25,"value":1039},{"type":20,"tag":140,"props":1098,"children":1099},{"style":171},[1100],{"type":25,"value":1101}," SByte",{"type":20,"tag":140,"props":1103,"children":1104},{"style":165},[1105],{"type":25,"value":486},{"type":20,"tag":140,"props":1107,"children":1108},{"style":153},[1109],{"type":25,"value":1053},{"type":20,"tag":140,"props":1111,"children":1112},{"style":236},[1113],{"type":25,"value":1114}," 1",{"type":20,"tag":140,"props":1116,"children":1117},{"style":165},[1118],{"type":25,"value":244},{"type":20,"tag":140,"props":1120,"children":1121},{"class":142,"line":280},[1122,1126,1130,1134,1139,1143,1147,1152],{"type":20,"tag":140,"props":1123,"children":1124},{"style":153},[1125],{"type":25,"value":1029},{"type":20,"tag":140,"props":1127,"children":1128},{"style":165},[1129],{"type":25,"value":1034},{"type":20,"tag":140,"props":1131,"children":1132},{"style":153},[1133],{"type":25,"value":1039},{"type":20,"tag":140,"props":1135,"children":1136},{"style":171},[1137],{"type":25,"value":1138}," Char",{"type":20,"tag":140,"props":1140,"children":1141},{"style":165},[1142],{"type":25,"value":486},{"type":20,"tag":140,"props":1144,"children":1145},{"style":153},[1146],{"type":25,"value":1053},{"type":20,"tag":140,"props":1148,"children":1149},{"style":236},[1150],{"type":25,"value":1151}," 3",{"type":20,"tag":140,"props":1153,"children":1154},{"style":165},[1155],{"type":25,"value":244},{"type":20,"tag":140,"props":1157,"children":1158},{"class":142,"line":314},[1159,1163,1167,1171,1176,1181,1185,1190,1195,1199,1204,1209],{"type":20,"tag":140,"props":1160,"children":1161},{"style":153},[1162],{"type":25,"value":1029},{"type":20,"tag":140,"props":1164,"children":1165},{"style":165},[1166],{"type":25,"value":1034},{"type":20,"tag":140,"props":1168,"children":1169},{"style":153},[1170],{"type":25,"value":1039},{"type":20,"tag":140,"props":1172,"children":1173},{"style":171},[1174],{"type":25,"value":1175}," Boolean",{"type":20,"tag":140,"props":1177,"children":1178},{"style":165},[1179],{"type":25,"value":1180}," b) ",{"type":20,"tag":140,"props":1182,"children":1183},{"style":153},[1184],{"type":25,"value":1053},{"type":20,"tag":140,"props":1186,"children":1187},{"style":165},[1188],{"type":25,"value":1189}," b ",{"type":20,"tag":140,"props":1191,"children":1192},{"style":147},[1193],{"type":25,"value":1194},"?",{"type":20,"tag":140,"props":1196,"children":1197},{"style":236},[1198],{"type":25,"value":1058},{"type":20,"tag":140,"props":1200,"children":1201},{"style":147},[1202],{"type":25,"value":1203}," :",{"type":20,"tag":140,"props":1205,"children":1206},{"style":236},[1207],{"type":25,"value":1208}," 5",{"type":20,"tag":140,"props":1210,"children":1211},{"style":165},[1212],{"type":25,"value":244},{"type":20,"tag":140,"props":1214,"children":1215},{"class":142,"line":344},[1216,1220,1224,1228,1233,1237,1241,1246],{"type":20,"tag":140,"props":1217,"children":1218},{"style":153},[1219],{"type":25,"value":1029},{"type":20,"tag":140,"props":1221,"children":1222},{"style":165},[1223],{"type":25,"value":1034},{"type":20,"tag":140,"props":1225,"children":1226},{"style":153},[1227],{"type":25,"value":1039},{"type":20,"tag":140,"props":1229,"children":1230},{"style":171},[1231],{"type":25,"value":1232}," Guid",{"type":20,"tag":140,"props":1234,"children":1235},{"style":165},[1236],{"type":25,"value":486},{"type":20,"tag":140,"props":1238,"children":1239},{"style":153},[1240],{"type":25,"value":1053},{"type":20,"tag":140,"props":1242,"children":1243},{"style":236},[1244],{"type":25,"value":1245}," 38",{"type":20,"tag":140,"props":1247,"children":1248},{"style":165},[1249],{"type":25,"value":244},{"type":20,"tag":140,"props":1251,"children":1252},{"class":142,"line":385},[1253,1257,1261,1265,1270,1274,1278,1282,1287,1291,1295,1300],{"type":20,"tag":140,"props":1254,"children":1255},{"style":153},[1256],{"type":25,"value":1029},{"type":20,"tag":140,"props":1258,"children":1259},{"style":165},[1260],{"type":25,"value":1034},{"type":20,"tag":140,"props":1262,"children":1263},{"style":153},[1264],{"type":25,"value":1039},{"type":20,"tag":140,"props":1266,"children":1267},{"style":171},[1268],{"type":25,"value":1269}," DateTime",{"type":20,"tag":140,"props":1271,"children":1272},{"style":147},[1273],{"type":25,"value":1087},{"type":20,"tag":140,"props":1275,"children":1276},{"style":165},[1277],{"type":25,"value":1092},{"type":20,"tag":140,"props":1279,"children":1280},{"style":153},[1281],{"type":25,"value":1039},{"type":20,"tag":140,"props":1283,"children":1284},{"style":171},[1285],{"type":25,"value":1286}," DateTimeOffset",{"type":20,"tag":140,"props":1288,"children":1289},{"style":165},[1290],{"type":25,"value":486},{"type":20,"tag":140,"props":1292,"children":1293},{"style":153},[1294],{"type":25,"value":1053},{"type":20,"tag":140,"props":1296,"children":1297},{"style":236},[1298],{"type":25,"value":1299}," 35",{"type":20,"tag":140,"props":1301,"children":1302},{"style":165},[1303],{"type":25,"value":244},{"type":20,"tag":140,"props":1305,"children":1306},{"class":142,"line":413},[1307,1311,1315,1319,1324,1329,1333,1338,1343,1348,1353,1358,1362],{"type":20,"tag":140,"props":1308,"children":1309},{"style":153},[1310],{"type":25,"value":1029},{"type":20,"tag":140,"props":1312,"children":1313},{"style":165},[1314],{"type":25,"value":1034},{"type":20,"tag":140,"props":1316,"children":1317},{"style":153},[1318],{"type":25,"value":1039},{"type":20,"tag":140,"props":1320,"children":1321},{"style":171},[1322],{"type":25,"value":1323}," Int16",{"type":20,"tag":140,"props":1325,"children":1326},{"style":165},[1327],{"type":25,"value":1328}," i16) ",{"type":20,"tag":140,"props":1330,"children":1331},{"style":153},[1332],{"type":25,"value":1053},{"type":20,"tag":140,"props":1334,"children":1335},{"style":165},[1336],{"type":25,"value":1337}," i16.",{"type":20,"tag":140,"props":1339,"children":1340},{"style":402},[1341],{"type":25,"value":1342},"ToString",{"type":20,"tag":140,"props":1344,"children":1345},{"style":165},[1346],{"type":25,"value":1347},"(CultureInfo.",{"type":20,"tag":140,"props":1349,"children":1350},{"style":890},[1351],{"type":25,"value":1352},"InvariantCulture",{"type":20,"tag":140,"props":1354,"children":1355},{"style":165},[1356],{"type":25,"value":1357},").",{"type":20,"tag":140,"props":1359,"children":1360},{"style":890},[1361],{"type":25,"value":893},{"type":20,"tag":140,"props":1363,"children":1364},{"style":165},[1365],{"type":25,"value":244},{"type":20,"tag":140,"props":1367,"children":1368},{"class":142,"line":513},[1369,1373,1377,1381,1386,1391,1395,1400,1404,1408,1412,1416,1420],{"type":20,"tag":140,"props":1370,"children":1371},{"style":153},[1372],{"type":25,"value":1029},{"type":20,"tag":140,"props":1374,"children":1375},{"style":165},[1376],{"type":25,"value":1034},{"type":20,"tag":140,"props":1378,"children":1379},{"style":153},[1380],{"type":25,"value":1039},{"type":20,"tag":140,"props":1382,"children":1383},{"style":171},[1384],{"type":25,"value":1385}," Int32",{"type":20,"tag":140,"props":1387,"children":1388},{"style":165},[1389],{"type":25,"value":1390}," i32) ",{"type":20,"tag":140,"props":1392,"children":1393},{"style":153},[1394],{"type":25,"value":1053},{"type":20,"tag":140,"props":1396,"children":1397},{"style":165},[1398],{"type":25,"value":1399}," i32.",{"type":20,"tag":140,"props":1401,"children":1402},{"style":402},[1403],{"type":25,"value":1342},{"type":20,"tag":140,"props":1405,"children":1406},{"style":165},[1407],{"type":25,"value":1347},{"type":20,"tag":140,"props":1409,"children":1410},{"style":890},[1411],{"type":25,"value":1352},{"type":20,"tag":140,"props":1413,"children":1414},{"style":165},[1415],{"type":25,"value":1357},{"type":20,"tag":140,"props":1417,"children":1418},{"style":890},[1419],{"type":25,"value":893},{"type":20,"tag":140,"props":1421,"children":1422},{"style":165},[1423],{"type":25,"value":244},{"type":20,"tag":140,"props":1425,"children":1426},{"class":142,"line":558},[1427,1431,1435,1439,1444,1449,1453,1458,1462,1466,1470,1474,1478],{"type":20,"tag":140,"props":1428,"children":1429},{"style":153},[1430],{"type":25,"value":1029},{"type":20,"tag":140,"props":1432,"children":1433},{"style":165},[1434],{"type":25,"value":1034},{"type":20,"tag":140,"props":1436,"children":1437},{"style":153},[1438],{"type":25,"value":1039},{"type":20,"tag":140,"props":1440,"children":1441},{"style":171},[1442],{"type":25,"value":1443}," Int64",{"type":20,"tag":140,"props":1445,"children":1446},{"style":165},[1447],{"type":25,"value":1448}," i64) ",{"type":20,"tag":140,"props":1450,"children":1451},{"style":153},[1452],{"type":25,"value":1053},{"type":20,"tag":140,"props":1454,"children":1455},{"style":165},[1456],{"type":25,"value":1457}," i64.",{"type":20,"tag":140,"props":1459,"children":1460},{"style":402},[1461],{"type":25,"value":1342},{"type":20,"tag":140,"props":1463,"children":1464},{"style":165},[1465],{"type":25,"value":1347},{"type":20,"tag":140,"props":1467,"children":1468},{"style":890},[1469],{"type":25,"value":1352},{"type":20,"tag":140,"props":1471,"children":1472},{"style":165},[1473],{"type":25,"value":1357},{"type":20,"tag":140,"props":1475,"children":1476},{"style":890},[1477],{"type":25,"value":893},{"type":20,"tag":140,"props":1479,"children":1480},{"style":165},[1481],{"type":25,"value":244},{"type":20,"tag":140,"props":1483,"children":1484},{"class":142,"line":622},[1485,1489,1493,1497,1502,1507,1511,1516,1520,1524,1528,1532,1536],{"type":20,"tag":140,"props":1486,"children":1487},{"style":153},[1488],{"type":25,"value":1029},{"type":20,"tag":140,"props":1490,"children":1491},{"style":165},[1492],{"type":25,"value":1034},{"type":20,"tag":140,"props":1494,"children":1495},{"style":153},[1496],{"type":25,"value":1039},{"type":20,"tag":140,"props":1498,"children":1499},{"style":171},[1500],{"type":25,"value":1501}," UInt16",{"type":20,"tag":140,"props":1503,"children":1504},{"style":165},[1505],{"type":25,"value":1506}," u16) ",{"type":20,"tag":140,"props":1508,"children":1509},{"style":153},[1510],{"type":25,"value":1053},{"type":20,"tag":140,"props":1512,"children":1513},{"style":165},[1514],{"type":25,"value":1515}," u16.",{"type":20,"tag":140,"props":1517,"children":1518},{"style":402},[1519],{"type":25,"value":1342},{"type":20,"tag":140,"props":1521,"children":1522},{"style":165},[1523],{"type":25,"value":1347},{"type":20,"tag":140,"props":1525,"children":1526},{"style":890},[1527],{"type":25,"value":1352},{"type":20,"tag":140,"props":1529,"children":1530},{"style":165},[1531],{"type":25,"value":1357},{"type":20,"tag":140,"props":1533,"children":1534},{"style":890},[1535],{"type":25,"value":893},{"type":20,"tag":140,"props":1537,"children":1538},{"style":165},[1539],{"type":25,"value":244},{"type":20,"tag":140,"props":1541,"children":1542},{"class":142,"line":677},[1543,1547,1551,1555,1560,1565,1569,1574,1578,1582,1586,1590,1594],{"type":20,"tag":140,"props":1544,"children":1545},{"style":153},[1546],{"type":25,"value":1029},{"type":20,"tag":140,"props":1548,"children":1549},{"style":165},[1550],{"type":25,"value":1034},{"type":20,"tag":140,"props":1552,"children":1553},{"style":153},[1554],{"type":25,"value":1039},{"type":20,"tag":140,"props":1556,"children":1557},{"style":171},[1558],{"type":25,"value":1559}," UInt32",{"type":20,"tag":140,"props":1561,"children":1562},{"style":165},[1563],{"type":25,"value":1564}," u32) ",{"type":20,"tag":140,"props":1566,"children":1567},{"style":153},[1568],{"type":25,"value":1053},{"type":20,"tag":140,"props":1570,"children":1571},{"style":165},[1572],{"type":25,"value":1573}," u32.",{"type":20,"tag":140,"props":1575,"children":1576},{"style":402},[1577],{"type":25,"value":1342},{"type":20,"tag":140,"props":1579,"children":1580},{"style":165},[1581],{"type":25,"value":1347},{"type":20,"tag":140,"props":1583,"children":1584},{"style":890},[1585],{"type":25,"value":1352},{"type":20,"tag":140,"props":1587,"children":1588},{"style":165},[1589],{"type":25,"value":1357},{"type":20,"tag":140,"props":1591,"children":1592},{"style":890},[1593],{"type":25,"value":893},{"type":20,"tag":140,"props":1595,"children":1596},{"style":165},[1597],{"type":25,"value":244},{"type":20,"tag":140,"props":1599,"children":1600},{"class":142,"line":770},[1601,1605,1609,1613,1618,1623,1627,1632,1636,1640,1644,1648,1652],{"type":20,"tag":140,"props":1602,"children":1603},{"style":153},[1604],{"type":25,"value":1029},{"type":20,"tag":140,"props":1606,"children":1607},{"style":165},[1608],{"type":25,"value":1034},{"type":20,"tag":140,"props":1610,"children":1611},{"style":153},[1612],{"type":25,"value":1039},{"type":20,"tag":140,"props":1614,"children":1615},{"style":171},[1616],{"type":25,"value":1617}," UInt64",{"type":20,"tag":140,"props":1619,"children":1620},{"style":165},[1621],{"type":25,"value":1622}," u64) ",{"type":20,"tag":140,"props":1624,"children":1625},{"style":153},[1626],{"type":25,"value":1053},{"type":20,"tag":140,"props":1628,"children":1629},{"style":165},[1630],{"type":25,"value":1631}," u64.",{"type":20,"tag":140,"props":1633,"children":1634},{"style":402},[1635],{"type":25,"value":1342},{"type":20,"tag":140,"props":1637,"children":1638},{"style":165},[1639],{"type":25,"value":1347},{"type":20,"tag":140,"props":1641,"children":1642},{"style":890},[1643],{"type":25,"value":1352},{"type":20,"tag":140,"props":1645,"children":1646},{"style":165},[1647],{"type":25,"value":1357},{"type":20,"tag":140,"props":1649,"children":1650},{"style":890},[1651],{"type":25,"value":893},{"type":20,"tag":140,"props":1653,"children":1654},{"style":165},[1655],{"type":25,"value":244},{"type":20,"tag":140,"props":1657,"children":1659},{"class":142,"line":1658},16,[1660,1664,1668,1672,1677,1682,1686,1691,1695,1700,1705],{"type":20,"tag":140,"props":1661,"children":1662},{"style":153},[1663],{"type":25,"value":1029},{"type":20,"tag":140,"props":1665,"children":1666},{"style":165},[1667],{"type":25,"value":1034},{"type":20,"tag":140,"props":1669,"children":1670},{"style":153},[1671],{"type":25,"value":1039},{"type":20,"tag":140,"props":1673,"children":1674},{"style":171},[1675],{"type":25,"value":1676}," String",{"type":20,"tag":140,"props":1678,"children":1679},{"style":165},[1680],{"type":25,"value":1681}," s) ",{"type":20,"tag":140,"props":1683,"children":1684},{"style":153},[1685],{"type":25,"value":1053},{"type":20,"tag":140,"props":1687,"children":1688},{"style":165},[1689],{"type":25,"value":1690}," s.",{"type":20,"tag":140,"props":1692,"children":1693},{"style":890},[1694],{"type":25,"value":893},{"type":20,"tag":140,"props":1696,"children":1697},{"style":147},[1698],{"type":25,"value":1699}," +",{"type":20,"tag":140,"props":1701,"children":1702},{"style":236},[1703],{"type":25,"value":1704}," 2",{"type":20,"tag":140,"props":1706,"children":1707},{"style":165},[1708],{"type":25,"value":244},{"type":20,"tag":140,"props":1710,"children":1712},{"class":142,"line":1711},17,[1713,1717,1721,1725,1730,1735,1739,1744,1748,1752,1756,1760,1764],{"type":20,"tag":140,"props":1714,"children":1715},{"style":153},[1716],{"type":25,"value":1029},{"type":20,"tag":140,"props":1718,"children":1719},{"style":165},[1720],{"type":25,"value":1034},{"type":20,"tag":140,"props":1722,"children":1723},{"style":153},[1724],{"type":25,"value":1039},{"type":20,"tag":140,"props":1726,"children":1727},{"style":171},[1728],{"type":25,"value":1729}," Decimal",{"type":20,"tag":140,"props":1731,"children":1732},{"style":165},[1733],{"type":25,"value":1734}," dec) ",{"type":20,"tag":140,"props":1736,"children":1737},{"style":153},[1738],{"type":25,"value":1053},{"type":20,"tag":140,"props":1740,"children":1741},{"style":165},[1742],{"type":25,"value":1743}," dec.",{"type":20,"tag":140,"props":1745,"children":1746},{"style":402},[1747],{"type":25,"value":1342},{"type":20,"tag":140,"props":1749,"children":1750},{"style":165},[1751],{"type":25,"value":1347},{"type":20,"tag":140,"props":1753,"children":1754},{"style":890},[1755],{"type":25,"value":1352},{"type":20,"tag":140,"props":1757,"children":1758},{"style":165},[1759],{"type":25,"value":1357},{"type":20,"tag":140,"props":1761,"children":1762},{"style":890},[1763],{"type":25,"value":893},{"type":20,"tag":140,"props":1765,"children":1766},{"style":165},[1767],{"type":25,"value":244},{"type":20,"tag":140,"props":1769,"children":1771},{"class":142,"line":1770},18,[1772,1776,1780,1784,1789,1794,1798,1803,1807,1811,1815,1819,1823],{"type":20,"tag":140,"props":1773,"children":1774},{"style":153},[1775],{"type":25,"value":1029},{"type":20,"tag":140,"props":1777,"children":1778},{"style":165},[1779],{"type":25,"value":1034},{"type":20,"tag":140,"props":1781,"children":1782},{"style":153},[1783],{"type":25,"value":1039},{"type":20,"tag":140,"props":1785,"children":1786},{"style":171},[1787],{"type":25,"value":1788}," Double",{"type":20,"tag":140,"props":1790,"children":1791},{"style":165},[1792],{"type":25,"value":1793}," dou) ",{"type":20,"tag":140,"props":1795,"children":1796},{"style":153},[1797],{"type":25,"value":1053},{"type":20,"tag":140,"props":1799,"children":1800},{"style":165},[1801],{"type":25,"value":1802}," dou.",{"type":20,"tag":140,"props":1804,"children":1805},{"style":402},[1806],{"type":25,"value":1342},{"type":20,"tag":140,"props":1808,"children":1809},{"style":165},[1810],{"type":25,"value":1347},{"type":20,"tag":140,"props":1812,"children":1813},{"style":890},[1814],{"type":25,"value":1352},{"type":20,"tag":140,"props":1816,"children":1817},{"style":165},[1818],{"type":25,"value":1357},{"type":20,"tag":140,"props":1820,"children":1821},{"style":890},[1822],{"type":25,"value":893},{"type":20,"tag":140,"props":1824,"children":1825},{"style":165},[1826],{"type":25,"value":244},{"type":20,"tag":140,"props":1828,"children":1830},{"class":142,"line":1829},19,[1831,1835,1839,1843,1848,1853,1857,1862,1866,1870,1874,1878,1882],{"type":20,"tag":140,"props":1832,"children":1833},{"style":153},[1834],{"type":25,"value":1029},{"type":20,"tag":140,"props":1836,"children":1837},{"style":165},[1838],{"type":25,"value":1034},{"type":20,"tag":140,"props":1840,"children":1841},{"style":153},[1842],{"type":25,"value":1039},{"type":20,"tag":140,"props":1844,"children":1845},{"style":171},[1846],{"type":25,"value":1847}," Single",{"type":20,"tag":140,"props":1849,"children":1850},{"style":165},[1851],{"type":25,"value":1852}," sin) ",{"type":20,"tag":140,"props":1854,"children":1855},{"style":153},[1856],{"type":25,"value":1053},{"type":20,"tag":140,"props":1858,"children":1859},{"style":165},[1860],{"type":25,"value":1861}," sin.",{"type":20,"tag":140,"props":1863,"children":1864},{"style":402},[1865],{"type":25,"value":1342},{"type":20,"tag":140,"props":1867,"children":1868},{"style":165},[1869],{"type":25,"value":1347},{"type":20,"tag":140,"props":1871,"children":1872},{"style":890},[1873],{"type":25,"value":1352},{"type":20,"tag":140,"props":1875,"children":1876},{"style":165},[1877],{"type":25,"value":1357},{"type":20,"tag":140,"props":1879,"children":1880},{"style":890},[1881],{"type":25,"value":893},{"type":20,"tag":140,"props":1883,"children":1884},{"style":165},[1885],{"type":25,"value":244},{"type":20,"tag":140,"props":1887,"children":1889},{"class":142,"line":1888},20,[1890,1894,1898,1902,1907,1912,1916,1921],{"type":20,"tag":140,"props":1891,"children":1892},{"style":153},[1893],{"type":25,"value":1029},{"type":20,"tag":140,"props":1895,"children":1896},{"style":165},[1897],{"type":25,"value":1034},{"type":20,"tag":140,"props":1899,"children":1900},{"style":153},[1901],{"type":25,"value":1039},{"type":20,"tag":140,"props":1903,"children":1904},{"style":171},[1905],{"type":25,"value":1906}," IDictionary",{"type":20,"tag":140,"props":1908,"children":1909},{"style":165},[1910],{"type":25,"value":1911}," dict) ",{"type":20,"tag":140,"props":1913,"children":1914},{"style":153},[1915],{"type":25,"value":1053},{"type":20,"tag":140,"props":1917,"children":1918},{"style":402},[1919],{"type":25,"value":1920}," EstimateDictionary",{"type":20,"tag":140,"props":1922,"children":1923},{"style":165},[1924],{"type":25,"value":1925},"(dict, includeNulls);\n",{"type":20,"tag":140,"props":1927,"children":1929},{"class":142,"line":1928},21,[1930,1934,1938,1942,1947,1952,1956,1961],{"type":20,"tag":140,"props":1931,"children":1932},{"style":153},[1933],{"type":25,"value":1029},{"type":20,"tag":140,"props":1935,"children":1936},{"style":165},[1937],{"type":25,"value":1034},{"type":20,"tag":140,"props":1939,"children":1940},{"style":153},[1941],{"type":25,"value":1039},{"type":20,"tag":140,"props":1943,"children":1944},{"style":171},[1945],{"type":25,"value":1946}," IEnumerable",{"type":20,"tag":140,"props":1948,"children":1949},{"style":165},[1950],{"type":25,"value":1951}," enumerable) ",{"type":20,"tag":140,"props":1953,"children":1954},{"style":153},[1955],{"type":25,"value":1053},{"type":20,"tag":140,"props":1957,"children":1958},{"style":402},[1959],{"type":25,"value":1960}," EstimateEnumerable",{"type":20,"tag":140,"props":1962,"children":1963},{"style":165},[1964],{"type":25,"value":1965},"(enumerable, includeNulls);\n",{"type":20,"tag":140,"props":1967,"children":1969},{"class":142,"line":1968},22,[1970],{"type":20,"tag":140,"props":1971,"children":1972},{"emptyLinePlaceholder":201},[1973],{"type":25,"value":204},{"type":20,"tag":140,"props":1975,"children":1977},{"class":142,"line":1976},23,[1978,1983,1988],{"type":20,"tag":140,"props":1979,"children":1980},{"style":153},[1981],{"type":25,"value":1982},"        return",{"type":20,"tag":140,"props":1984,"children":1985},{"style":402},[1986],{"type":25,"value":1987}," EstimateObject",{"type":20,"tag":140,"props":1989,"children":1990},{"style":165},[1991],{"type":25,"value":1992},"(obj, includeNulls);\n",{"type":20,"tag":140,"props":1994,"children":1996},{"class":142,"line":1995},24,[1997],{"type":20,"tag":140,"props":1998,"children":1999},{"style":165},[2000],{"type":25,"value":2001},"    }\n",{"type":20,"tag":140,"props":2003,"children":2005},{"class":142,"line":2004},25,[2006],{"type":20,"tag":140,"props":2007,"children":2008},{"emptyLinePlaceholder":201},[2009],{"type":25,"value":204},{"type":20,"tag":140,"props":2011,"children":2013},{"class":142,"line":2012},26,[2014,2019,2023,2027,2031,2036,2041,2045,2049,2053],{"type":20,"tag":140,"props":2015,"children":2016},{"style":147},[2017],{"type":25,"value":2018},"    static",{"type":20,"tag":140,"props":2020,"children":2021},{"style":186},[2022],{"type":25,"value":328},{"type":20,"tag":140,"props":2024,"children":2025},{"style":402},[2026],{"type":25,"value":1960},{"type":20,"tag":140,"props":2028,"children":2029},{"style":165},[2030],{"type":25,"value":437},{"type":20,"tag":140,"props":2032,"children":2033},{"style":171},[2034],{"type":25,"value":2035},"IEnumerable",{"type":20,"tag":140,"props":2037,"children":2038},{"style":450},[2039],{"type":25,"value":2040}," enumerable",{"type":20,"tag":140,"props":2042,"children":2043},{"style":165},[2044],{"type":25,"value":458},{"type":20,"tag":140,"props":2046,"children":2047},{"style":186},[2048],{"type":25,"value":1011},{"type":20,"tag":140,"props":2050,"children":2051},{"style":450},[2052],{"type":25,"value":1016},{"type":20,"tag":140,"props":2054,"children":2055},{"style":165},[2056],{"type":25,"value":1021},{"type":20,"tag":140,"props":2058,"children":2060},{"class":142,"line":2059},27,[2061,2066,2070,2074,2078],{"type":20,"tag":140,"props":2062,"children":2063},{"style":186},[2064],{"type":25,"value":2065},"        long",{"type":20,"tag":140,"props":2067,"children":2068},{"style":165},[2069],{"type":25,"value":878},{"type":20,"tag":140,"props":2071,"children":2072},{"style":147},[2073],{"type":25,"value":546},{"type":20,"tag":140,"props":2075,"children":2076},{"style":236},[2077],{"type":25,"value":551},{"type":20,"tag":140,"props":2079,"children":2080},{"style":165},[2081],{"type":25,"value":244},{"type":20,"tag":140,"props":2083,"children":2085},{"class":142,"line":2084},28,[2086,2091,2096,2100,2105,2110],{"type":20,"tag":140,"props":2087,"children":2088},{"style":153},[2089],{"type":25,"value":2090},"        foreach",{"type":20,"tag":140,"props":2092,"children":2093},{"style":165},[2094],{"type":25,"value":2095}," (",{"type":20,"tag":140,"props":2097,"children":2098},{"style":186},[2099],{"type":25,"value":873},{"type":20,"tag":140,"props":2101,"children":2102},{"style":165},[2103],{"type":25,"value":2104}," item ",{"type":20,"tag":140,"props":2106,"children":2107},{"style":153},[2108],{"type":25,"value":2109},"in",{"type":20,"tag":140,"props":2111,"children":2112},{"style":165},[2113],{"type":25,"value":2114}," enumerable)\n",{"type":20,"tag":140,"props":2116,"children":2118},{"class":142,"line":2117},29,[2119,2124,2128,2132,2137,2142,2146,2150],{"type":20,"tag":140,"props":2120,"children":2121},{"style":165},[2122],{"type":25,"value":2123},"            size ",{"type":20,"tag":140,"props":2125,"children":2126},{"style":147},[2127],{"type":25,"value":752},{"type":20,"tag":140,"props":2129,"children":2130},{"style":402},[2131],{"type":25,"value":988},{"type":20,"tag":140,"props":2133,"children":2134},{"style":165},[2135],{"type":25,"value":2136},"(item, includeNulls) ",{"type":20,"tag":140,"props":2138,"children":2139},{"style":147},[2140],{"type":25,"value":2141},"+",{"type":20,"tag":140,"props":2143,"children":2144},{"style":236},[2145],{"type":25,"value":1114},{"type":20,"tag":140,"props":2147,"children":2148},{"style":165},[2149],{"type":25,"value":372},{"type":20,"tag":140,"props":2151,"children":2153},{"style":2152},"--shiki-default:#939F91;--shiki-default-font-style:italic;--shiki-dark:#6272A4;--shiki-dark-font-style:inherit",[2154],{"type":25,"value":2155},"// ,\n",{"type":20,"tag":140,"props":2157,"children":2159},{"class":142,"line":2158},30,[2160,2164,2168,2173,2177,2182,2186,2190,2194,2198,2202],{"type":20,"tag":140,"props":2161,"children":2162},{"style":153},[2163],{"type":25,"value":1982},{"type":20,"tag":140,"props":2165,"children":2166},{"style":165},[2167],{"type":25,"value":878},{"type":20,"tag":140,"props":2169,"children":2170},{"style":147},[2171],{"type":25,"value":2172},">",{"type":20,"tag":140,"props":2174,"children":2175},{"style":236},[2176],{"type":25,"value":551},{"type":20,"tag":140,"props":2178,"children":2179},{"style":147},[2180],{"type":25,"value":2181}," ?",{"type":20,"tag":140,"props":2183,"children":2184},{"style":165},[2185],{"type":25,"value":878},{"type":20,"tag":140,"props":2187,"children":2188},{"style":147},[2189],{"type":25,"value":2141},{"type":20,"tag":140,"props":2191,"children":2192},{"style":236},[2193],{"type":25,"value":1114},{"type":20,"tag":140,"props":2195,"children":2196},{"style":147},[2197],{"type":25,"value":1203},{"type":20,"tag":140,"props":2199,"children":2200},{"style":236},[2201],{"type":25,"value":1704},{"type":20,"tag":140,"props":2203,"children":2204},{"style":165},[2205],{"type":25,"value":244},{"type":20,"tag":140,"props":2207,"children":2209},{"class":142,"line":2208},31,[2210],{"type":20,"tag":140,"props":2211,"children":2212},{"style":165},[2213],{"type":25,"value":2001},{"type":20,"tag":140,"props":2215,"children":2217},{"class":142,"line":2216},32,[2218],{"type":20,"tag":140,"props":2219,"children":2220},{"emptyLinePlaceholder":201},[2221],{"type":25,"value":204},{"type":20,"tag":140,"props":2223,"children":2225},{"class":142,"line":2224},33,[2226,2230,2235,2240,2245,2249,2254,2259,2264,2268,2273],{"type":20,"tag":140,"props":2227,"children":2228},{"style":147},[2229],{"type":25,"value":2018},{"type":20,"tag":140,"props":2231,"children":2232},{"style":147},[2233],{"type":25,"value":2234}," readonly",{"type":20,"tag":140,"props":2236,"children":2237},{"style":171},[2238],{"type":25,"value":2239}," BindingFlags",{"type":20,"tag":140,"props":2241,"children":2242},{"style":165},[2243],{"type":25,"value":2244}," publicInstance ",{"type":20,"tag":140,"props":2246,"children":2247},{"style":147},[2248],{"type":25,"value":546},{"type":20,"tag":140,"props":2250,"children":2251},{"style":165},[2252],{"type":25,"value":2253}," BindingFlags.",{"type":20,"tag":140,"props":2255,"children":2256},{"style":890},[2257],{"type":25,"value":2258},"Instance",{"type":20,"tag":140,"props":2260,"children":2261},{"style":147},[2262],{"type":25,"value":2263}," |",{"type":20,"tag":140,"props":2265,"children":2266},{"style":165},[2267],{"type":25,"value":2253},{"type":20,"tag":140,"props":2269,"children":2270},{"style":890},[2271],{"type":25,"value":2272},"Public",{"type":20,"tag":140,"props":2274,"children":2275},{"style":165},[2276],{"type":25,"value":244},{"type":20,"tag":140,"props":2278,"children":2280},{"class":142,"line":2279},34,[2281],{"type":20,"tag":140,"props":2282,"children":2283},{"emptyLinePlaceholder":201},[2284],{"type":25,"value":204},{"type":20,"tag":140,"props":2286,"children":2288},{"class":142,"line":2287},35,[2289,2293,2297,2301,2305,2310,2315,2319,2323,2327],{"type":20,"tag":140,"props":2290,"children":2291},{"style":147},[2292],{"type":25,"value":2018},{"type":20,"tag":140,"props":2294,"children":2295},{"style":186},[2296],{"type":25,"value":328},{"type":20,"tag":140,"props":2298,"children":2299},{"style":402},[2300],{"type":25,"value":1920},{"type":20,"tag":140,"props":2302,"children":2303},{"style":165},[2304],{"type":25,"value":437},{"type":20,"tag":140,"props":2306,"children":2307},{"style":171},[2308],{"type":25,"value":2309},"IDictionary",{"type":20,"tag":140,"props":2311,"children":2312},{"style":450},[2313],{"type":25,"value":2314}," dictionary",{"type":20,"tag":140,"props":2316,"children":2317},{"style":165},[2318],{"type":25,"value":458},{"type":20,"tag":140,"props":2320,"children":2321},{"style":186},[2322],{"type":25,"value":1011},{"type":20,"tag":140,"props":2324,"children":2325},{"style":450},[2326],{"type":25,"value":1016},{"type":20,"tag":140,"props":2328,"children":2329},{"style":165},[2330],{"type":25,"value":1021},{"type":20,"tag":140,"props":2332,"children":2334},{"class":142,"line":2333},36,[2335,2339,2343,2347,2351,2355],{"type":20,"tag":140,"props":2336,"children":2337},{"style":186},[2338],{"type":25,"value":2065},{"type":20,"tag":140,"props":2340,"children":2341},{"style":165},[2342],{"type":25,"value":878},{"type":20,"tag":140,"props":2344,"children":2345},{"style":147},[2346],{"type":25,"value":546},{"type":20,"tag":140,"props":2348,"children":2349},{"style":236},[2350],{"type":25,"value":1704},{"type":20,"tag":140,"props":2352,"children":2353},{"style":165},[2354],{"type":25,"value":372},{"type":20,"tag":140,"props":2356,"children":2357},{"style":2152},[2358],{"type":25,"value":2359},"// { }\n",{"type":20,"tag":140,"props":2361,"children":2363},{"class":142,"line":2362},37,[2364,2369,2374,2378,2382],{"type":20,"tag":140,"props":2365,"children":2366},{"style":186},[2367],{"type":25,"value":2368},"        bool",{"type":20,"tag":140,"props":2370,"children":2371},{"style":165},[2372],{"type":25,"value":2373}," wasFirst ",{"type":20,"tag":140,"props":2375,"children":2376},{"style":147},[2377],{"type":25,"value":546},{"type":20,"tag":140,"props":2379,"children":2380},{"style":236},[2381],{"type":25,"value":307},{"type":20,"tag":140,"props":2383,"children":2384},{"style":165},[2385],{"type":25,"value":244},{"type":20,"tag":140,"props":2387,"children":2389},{"class":142,"line":2388},38,[2390,2394,2398,2402,2407,2411,2416,2421],{"type":20,"tag":140,"props":2391,"children":2392},{"style":153},[2393],{"type":25,"value":2090},{"type":20,"tag":140,"props":2395,"children":2396},{"style":165},[2397],{"type":25,"value":2095},{"type":20,"tag":140,"props":2399,"children":2400},{"style":186},[2401],{"type":25,"value":873},{"type":20,"tag":140,"props":2403,"children":2404},{"style":165},[2405],{"type":25,"value":2406}," key ",{"type":20,"tag":140,"props":2408,"children":2409},{"style":153},[2410],{"type":25,"value":2109},{"type":20,"tag":140,"props":2412,"children":2413},{"style":165},[2414],{"type":25,"value":2415}," dictionary.",{"type":20,"tag":140,"props":2417,"children":2418},{"style":890},[2419],{"type":25,"value":2420},"Keys",{"type":20,"tag":140,"props":2422,"children":2423},{"style":165},[2424],{"type":25,"value":1021},{"type":20,"tag":140,"props":2426,"children":2428},{"class":142,"line":2427},39,[2429,2434,2439,2443,2447],{"type":20,"tag":140,"props":2430,"children":2431},{"style":186},[2432],{"type":25,"value":2433},"            var",{"type":20,"tag":140,"props":2435,"children":2436},{"style":165},[2437],{"type":25,"value":2438}," value ",{"type":20,"tag":140,"props":2440,"children":2441},{"style":147},[2442],{"type":25,"value":546},{"type":20,"tag":140,"props":2444,"children":2445},{"style":890},[2446],{"type":25,"value":2314},{"type":20,"tag":140,"props":2448,"children":2449},{"style":165},[2450],{"type":25,"value":2451},"[key];\n",{"type":20,"tag":140,"props":2453,"children":2455},{"class":142,"line":2454},40,[2456,2461,2466,2471,2475,2480,2484],{"type":20,"tag":140,"props":2457,"children":2458},{"style":153},[2459],{"type":25,"value":2460},"            if",{"type":20,"tag":140,"props":2462,"children":2463},{"style":165},[2464],{"type":25,"value":2465}," (includeNulls ",{"type":20,"tag":140,"props":2467,"children":2468},{"style":147},[2469],{"type":25,"value":2470},"||",{"type":20,"tag":140,"props":2472,"children":2473},{"style":165},[2474],{"type":25,"value":2438},{"type":20,"tag":140,"props":2476,"children":2477},{"style":147},[2478],{"type":25,"value":2479},"!=",{"type":20,"tag":140,"props":2481,"children":2482},{"style":236},[2483],{"type":25,"value":1044},{"type":20,"tag":140,"props":2485,"children":2486},{"style":165},[2487],{"type":25,"value":1021},{"type":20,"tag":140,"props":2489,"children":2491},{"class":142,"line":2490},41,[2492,2497,2501,2506],{"type":20,"tag":140,"props":2493,"children":2494},{"style":153},[2495],{"type":25,"value":2496},"                if",{"type":20,"tag":140,"props":2498,"children":2499},{"style":165},[2500],{"type":25,"value":2095},{"type":20,"tag":140,"props":2502,"children":2503},{"style":147},[2504],{"type":25,"value":2505},"!",{"type":20,"tag":140,"props":2507,"children":2508},{"style":165},[2509],{"type":25,"value":2510},"wasFirst)\n",{"type":20,"tag":140,"props":2512,"children":2514},{"class":142,"line":2513},42,[2515,2520,2525],{"type":20,"tag":140,"props":2516,"children":2517},{"style":165},[2518],{"type":25,"value":2519},"                    size",{"type":20,"tag":140,"props":2521,"children":2522},{"style":147},[2523],{"type":25,"value":2524},"++",{"type":20,"tag":140,"props":2526,"children":2527},{"style":165},[2528],{"type":25,"value":244},{"type":20,"tag":140,"props":2530,"children":2532},{"class":142,"line":2531},43,[2533],{"type":20,"tag":140,"props":2534,"children":2535},{"style":153},[2536],{"type":25,"value":2537},"                else\n",{"type":20,"tag":140,"props":2539,"children":2541},{"class":142,"line":2540},44,[2542,2547,2551,2555],{"type":20,"tag":140,"props":2543,"children":2544},{"style":165},[2545],{"type":25,"value":2546},"                    wasFirst ",{"type":20,"tag":140,"props":2548,"children":2549},{"style":147},[2550],{"type":25,"value":546},{"type":20,"tag":140,"props":2552,"children":2553},{"style":236},[2554],{"type":25,"value":239},{"type":20,"tag":140,"props":2556,"children":2557},{"style":165},[2558],{"type":25,"value":244},{"type":20,"tag":140,"props":2560,"children":2562},{"class":142,"line":2561},45,[2563,2568,2572,2576,2581,2585,2589,2593,2597,2602],{"type":20,"tag":140,"props":2564,"children":2565},{"style":165},[2566],{"type":25,"value":2567},"                size ",{"type":20,"tag":140,"props":2569,"children":2570},{"style":147},[2571],{"type":25,"value":752},{"type":20,"tag":140,"props":2573,"children":2574},{"style":402},[2575],{"type":25,"value":988},{"type":20,"tag":140,"props":2577,"children":2578},{"style":165},[2579],{"type":25,"value":2580},"(key, includeNulls) ",{"type":20,"tag":140,"props":2582,"children":2583},{"style":147},[2584],{"type":25,"value":2141},{"type":20,"tag":140,"props":2586,"children":2587},{"style":236},[2588],{"type":25,"value":1114},{"type":20,"tag":140,"props":2590,"children":2591},{"style":147},[2592],{"type":25,"value":1699},{"type":20,"tag":140,"props":2594,"children":2595},{"style":402},[2596],{"type":25,"value":988},{"type":20,"tag":140,"props":2598,"children":2599},{"style":165},[2600],{"type":25,"value":2601},"(value, includeNulls); ",{"type":20,"tag":140,"props":2603,"children":2604},{"style":2152},[2605],{"type":25,"value":2606},"// :,\n",{"type":20,"tag":140,"props":2608,"children":2610},{"class":142,"line":2609},46,[2611],{"type":20,"tag":140,"props":2612,"children":2613},{"style":165},[2614],{"type":25,"value":2615},"            }\n",{"type":20,"tag":140,"props":2617,"children":2619},{"class":142,"line":2618},47,[2620],{"type":20,"tag":140,"props":2621,"children":2622},{"style":165},[2623],{"type":25,"value":2624},"        }\n",{"type":20,"tag":140,"props":2626,"children":2628},{"class":142,"line":2627},48,[2629,2633],{"type":20,"tag":140,"props":2630,"children":2631},{"style":153},[2632],{"type":25,"value":1982},{"type":20,"tag":140,"props":2634,"children":2635},{"style":165},[2636],{"type":25,"value":2637}," size;\n",{"type":20,"tag":140,"props":2639,"children":2641},{"class":142,"line":2640},49,[2642],{"type":20,"tag":140,"props":2643,"children":2644},{"style":165},[2645],{"type":25,"value":2001},{"type":20,"tag":140,"props":2647,"children":2649},{"class":142,"line":2648},50,[2650],{"type":20,"tag":140,"props":2651,"children":2652},{"emptyLinePlaceholder":201},[2653],{"type":25,"value":204},{"type":20,"tag":140,"props":2655,"children":2657},{"class":142,"line":2656},51,[2658,2662,2666,2670,2674,2678,2682,2686,2690,2694],{"type":20,"tag":140,"props":2659,"children":2660},{"style":147},[2661],{"type":25,"value":2018},{"type":20,"tag":140,"props":2663,"children":2664},{"style":186},[2665],{"type":25,"value":328},{"type":20,"tag":140,"props":2667,"children":2668},{"style":402},[2669],{"type":25,"value":1987},{"type":20,"tag":140,"props":2671,"children":2672},{"style":165},[2673],{"type":25,"value":437},{"type":20,"tag":140,"props":2675,"children":2676},{"style":186},[2677],{"type":25,"value":997},{"type":20,"tag":140,"props":2679,"children":2680},{"style":450},[2681],{"type":25,"value":1002},{"type":20,"tag":140,"props":2683,"children":2684},{"style":165},[2685],{"type":25,"value":458},{"type":20,"tag":140,"props":2687,"children":2688},{"style":186},[2689],{"type":25,"value":1011},{"type":20,"tag":140,"props":2691,"children":2692},{"style":450},[2693],{"type":25,"value":1016},{"type":20,"tag":140,"props":2695,"children":2696},{"style":165},[2697],{"type":25,"value":1021},{"type":20,"tag":140,"props":2699,"children":2701},{"class":142,"line":2700},52,[2702,2706,2710,2714,2718],{"type":20,"tag":140,"props":2703,"children":2704},{"style":186},[2705],{"type":25,"value":2065},{"type":20,"tag":140,"props":2707,"children":2708},{"style":165},[2709],{"type":25,"value":878},{"type":20,"tag":140,"props":2711,"children":2712},{"style":147},[2713],{"type":25,"value":546},{"type":20,"tag":140,"props":2715,"children":2716},{"style":236},[2717],{"type":25,"value":1704},{"type":20,"tag":140,"props":2719,"children":2720},{"style":165},[2721],{"type":25,"value":244},{"type":20,"tag":140,"props":2723,"children":2725},{"class":142,"line":2724},53,[2726,2730,2734,2738,2742],{"type":20,"tag":140,"props":2727,"children":2728},{"style":186},[2729],{"type":25,"value":2368},{"type":20,"tag":140,"props":2731,"children":2732},{"style":165},[2733],{"type":25,"value":2373},{"type":20,"tag":140,"props":2735,"children":2736},{"style":147},[2737],{"type":25,"value":546},{"type":20,"tag":140,"props":2739,"children":2740},{"style":236},[2741],{"type":25,"value":307},{"type":20,"tag":140,"props":2743,"children":2744},{"style":165},[2745],{"type":25,"value":244},{"type":20,"tag":140,"props":2747,"children":2749},{"class":142,"line":2748},54,[2750,2755,2760,2764,2769,2774],{"type":20,"tag":140,"props":2751,"children":2752},{"style":186},[2753],{"type":25,"value":2754},"        var",{"type":20,"tag":140,"props":2756,"children":2757},{"style":165},[2758],{"type":25,"value":2759}," type ",{"type":20,"tag":140,"props":2761,"children":2762},{"style":147},[2763],{"type":25,"value":546},{"type":20,"tag":140,"props":2765,"children":2766},{"style":165},[2767],{"type":25,"value":2768}," obj.",{"type":20,"tag":140,"props":2770,"children":2771},{"style":402},[2772],{"type":25,"value":2773},"GetType",{"type":20,"tag":140,"props":2775,"children":2776},{"style":165},[2777],{"type":25,"value":510},{"type":20,"tag":140,"props":2779,"children":2781},{"class":142,"line":2780},55,[2782,2786,2791,2795,2800,2805],{"type":20,"tag":140,"props":2783,"children":2784},{"style":186},[2785],{"type":25,"value":2754},{"type":20,"tag":140,"props":2787,"children":2788},{"style":165},[2789],{"type":25,"value":2790}," properties ",{"type":20,"tag":140,"props":2792,"children":2793},{"style":147},[2794],{"type":25,"value":546},{"type":20,"tag":140,"props":2796,"children":2797},{"style":165},[2798],{"type":25,"value":2799}," type.",{"type":20,"tag":140,"props":2801,"children":2802},{"style":402},[2803],{"type":25,"value":2804},"GetProperties",{"type":20,"tag":140,"props":2806,"children":2807},{"style":165},[2808],{"type":25,"value":2809},"(publicInstance);\n",{"type":20,"tag":140,"props":2811,"children":2813},{"class":142,"line":2812},56,[2814,2818,2822,2826,2831,2835],{"type":20,"tag":140,"props":2815,"children":2816},{"style":153},[2817],{"type":25,"value":2090},{"type":20,"tag":140,"props":2819,"children":2820},{"style":165},[2821],{"type":25,"value":2095},{"type":20,"tag":140,"props":2823,"children":2824},{"style":186},[2825],{"type":25,"value":873},{"type":20,"tag":140,"props":2827,"children":2828},{"style":165},[2829],{"type":25,"value":2830}," property ",{"type":20,"tag":140,"props":2832,"children":2833},{"style":153},[2834],{"type":25,"value":2109},{"type":20,"tag":140,"props":2836,"children":2837},{"style":165},[2838],{"type":25,"value":2839}," properties) {\n",{"type":20,"tag":140,"props":2841,"children":2843},{"class":142,"line":2842},57,[2844,2848,2853,2858,2863,2868,2873],{"type":20,"tag":140,"props":2845,"children":2846},{"style":153},[2847],{"type":25,"value":2460},{"type":20,"tag":140,"props":2849,"children":2850},{"style":165},[2851],{"type":25,"value":2852}," (property.",{"type":20,"tag":140,"props":2854,"children":2855},{"style":890},[2856],{"type":25,"value":2857},"CanRead",{"type":20,"tag":140,"props":2859,"children":2860},{"style":147},[2861],{"type":25,"value":2862}," &&",{"type":20,"tag":140,"props":2864,"children":2865},{"style":165},[2866],{"type":25,"value":2867}," property.",{"type":20,"tag":140,"props":2869,"children":2870},{"style":890},[2871],{"type":25,"value":2872},"CanWrite",{"type":20,"tag":140,"props":2874,"children":2875},{"style":165},[2876],{"type":25,"value":1021},{"type":20,"tag":140,"props":2878,"children":2880},{"class":142,"line":2879},58,[2881,2886,2890,2894,2898,2903],{"type":20,"tag":140,"props":2882,"children":2883},{"style":186},[2884],{"type":25,"value":2885},"                var",{"type":20,"tag":140,"props":2887,"children":2888},{"style":165},[2889],{"type":25,"value":2438},{"type":20,"tag":140,"props":2891,"children":2892},{"style":147},[2893],{"type":25,"value":546},{"type":20,"tag":140,"props":2895,"children":2896},{"style":165},[2897],{"type":25,"value":2867},{"type":20,"tag":140,"props":2899,"children":2900},{"style":402},[2901],{"type":25,"value":2902},"GetValue",{"type":20,"tag":140,"props":2904,"children":2905},{"style":165},[2906],{"type":25,"value":2907},"(obj);\n",{"type":20,"tag":140,"props":2909,"children":2911},{"class":142,"line":2910},59,[2912,2916,2920,2924,2928,2932,2936],{"type":20,"tag":140,"props":2913,"children":2914},{"style":153},[2915],{"type":25,"value":2496},{"type":20,"tag":140,"props":2917,"children":2918},{"style":165},[2919],{"type":25,"value":2465},{"type":20,"tag":140,"props":2921,"children":2922},{"style":147},[2923],{"type":25,"value":2470},{"type":20,"tag":140,"props":2925,"children":2926},{"style":165},[2927],{"type":25,"value":2438},{"type":20,"tag":140,"props":2929,"children":2930},{"style":147},[2931],{"type":25,"value":2479},{"type":20,"tag":140,"props":2933,"children":2934},{"style":236},[2935],{"type":25,"value":1044},{"type":20,"tag":140,"props":2937,"children":2938},{"style":165},[2939],{"type":25,"value":1021},{"type":20,"tag":140,"props":2941,"children":2943},{"class":142,"line":2942},60,[2944,2949,2953,2957],{"type":20,"tag":140,"props":2945,"children":2946},{"style":153},[2947],{"type":25,"value":2948},"                    if",{"type":20,"tag":140,"props":2950,"children":2951},{"style":165},[2952],{"type":25,"value":2095},{"type":20,"tag":140,"props":2954,"children":2955},{"style":147},[2956],{"type":25,"value":2505},{"type":20,"tag":140,"props":2958,"children":2959},{"style":165},[2960],{"type":25,"value":2510},{"type":20,"tag":140,"props":2962,"children":2964},{"class":142,"line":2963},61,[2965,2970,2974],{"type":20,"tag":140,"props":2966,"children":2967},{"style":165},[2968],{"type":25,"value":2969},"                        size",{"type":20,"tag":140,"props":2971,"children":2972},{"style":147},[2973],{"type":25,"value":2524},{"type":20,"tag":140,"props":2975,"children":2976},{"style":165},[2977],{"type":25,"value":244},{"type":20,"tag":140,"props":2979,"children":2981},{"class":142,"line":2980},62,[2982],{"type":20,"tag":140,"props":2983,"children":2984},{"style":153},[2985],{"type":25,"value":2986},"                    else\n",{"type":20,"tag":140,"props":2988,"children":2990},{"class":142,"line":2989},63,[2991,2996,3000,3004],{"type":20,"tag":140,"props":2992,"children":2993},{"style":165},[2994],{"type":25,"value":2995},"                        wasFirst ",{"type":20,"tag":140,"props":2997,"children":2998},{"style":147},[2999],{"type":25,"value":546},{"type":20,"tag":140,"props":3001,"children":3002},{"style":236},[3003],{"type":25,"value":239},{"type":20,"tag":140,"props":3005,"children":3006},{"style":165},[3007],{"type":25,"value":244},{"type":20,"tag":140,"props":3009,"children":3011},{"class":142,"line":3010},64,[3012,3017,3021,3025,3030,3035,3039,3043,3047,3051,3055],{"type":20,"tag":140,"props":3013,"children":3014},{"style":165},[3015],{"type":25,"value":3016},"                    size ",{"type":20,"tag":140,"props":3018,"children":3019},{"style":147},[3020],{"type":25,"value":752},{"type":20,"tag":140,"props":3022,"children":3023},{"style":165},[3024],{"type":25,"value":2867},{"type":20,"tag":140,"props":3026,"children":3027},{"style":890},[3028],{"type":25,"value":3029},"Name",{"type":20,"tag":140,"props":3031,"children":3032},{"style":165},[3033],{"type":25,"value":3034},".",{"type":20,"tag":140,"props":3036,"children":3037},{"style":890},[3038],{"type":25,"value":893},{"type":20,"tag":140,"props":3040,"children":3041},{"style":147},[3042],{"type":25,"value":1699},{"type":20,"tag":140,"props":3044,"children":3045},{"style":236},[3046],{"type":25,"value":1151},{"type":20,"tag":140,"props":3048,"children":3049},{"style":147},[3050],{"type":25,"value":1699},{"type":20,"tag":140,"props":3052,"children":3053},{"style":402},[3054],{"type":25,"value":988},{"type":20,"tag":140,"props":3056,"children":3057},{"style":165},[3058],{"type":25,"value":3059},"(value, includeNulls);\n",{"type":20,"tag":140,"props":3061,"children":3063},{"class":142,"line":3062},65,[3064],{"type":20,"tag":140,"props":3065,"children":3066},{"style":165},[3067],{"type":25,"value":3068},"                }\n",{"type":20,"tag":140,"props":3070,"children":3072},{"class":142,"line":3071},66,[3073],{"type":20,"tag":140,"props":3074,"children":3075},{"style":165},[3076],{"type":25,"value":2615},{"type":20,"tag":140,"props":3078,"children":3080},{"class":142,"line":3079},67,[3081],{"type":20,"tag":140,"props":3082,"children":3083},{"style":165},[3084],{"type":25,"value":2624},{"type":20,"tag":140,"props":3086,"children":3088},{"class":142,"line":3087},68,[3089],{"type":20,"tag":140,"props":3090,"children":3091},{"emptyLinePlaceholder":201},[3092],{"type":25,"value":204},{"type":20,"tag":140,"props":3094,"children":3096},{"class":142,"line":3095},69,[3097,3101,3106,3110,3114,3119],{"type":20,"tag":140,"props":3098,"children":3099},{"style":186},[3100],{"type":25,"value":2754},{"type":20,"tag":140,"props":3102,"children":3103},{"style":165},[3104],{"type":25,"value":3105}," fields ",{"type":20,"tag":140,"props":3107,"children":3108},{"style":147},[3109],{"type":25,"value":546},{"type":20,"tag":140,"props":3111,"children":3112},{"style":165},[3113],{"type":25,"value":2799},{"type":20,"tag":140,"props":3115,"children":3116},{"style":402},[3117],{"type":25,"value":3118},"GetFields",{"type":20,"tag":140,"props":3120,"children":3121},{"style":165},[3122],{"type":25,"value":2809},{"type":20,"tag":140,"props":3124,"children":3126},{"class":142,"line":3125},70,[3127,3131,3135,3139,3144,3148],{"type":20,"tag":140,"props":3128,"children":3129},{"style":153},[3130],{"type":25,"value":2090},{"type":20,"tag":140,"props":3132,"children":3133},{"style":165},[3134],{"type":25,"value":2095},{"type":20,"tag":140,"props":3136,"children":3137},{"style":186},[3138],{"type":25,"value":873},{"type":20,"tag":140,"props":3140,"children":3141},{"style":165},[3142],{"type":25,"value":3143}," field ",{"type":20,"tag":140,"props":3145,"children":3146},{"style":153},[3147],{"type":25,"value":2109},{"type":20,"tag":140,"props":3149,"children":3150},{"style":165},[3151],{"type":25,"value":3152}," fields) {\n",{"type":20,"tag":140,"props":3154,"children":3156},{"class":142,"line":3155},71,[3157,3161,3165,3169,3174,3178],{"type":20,"tag":140,"props":3158,"children":3159},{"style":186},[3160],{"type":25,"value":2433},{"type":20,"tag":140,"props":3162,"children":3163},{"style":165},[3164],{"type":25,"value":2438},{"type":20,"tag":140,"props":3166,"children":3167},{"style":147},[3168],{"type":25,"value":546},{"type":20,"tag":140,"props":3170,"children":3171},{"style":165},[3172],{"type":25,"value":3173}," field.",{"type":20,"tag":140,"props":3175,"children":3176},{"style":402},[3177],{"type":25,"value":2902},{"type":20,"tag":140,"props":3179,"children":3180},{"style":165},[3181],{"type":25,"value":2907},{"type":20,"tag":140,"props":3183,"children":3185},{"class":142,"line":3184},72,[3186,3190,3194,3198,3202,3206,3210],{"type":20,"tag":140,"props":3187,"children":3188},{"style":153},[3189],{"type":25,"value":2460},{"type":20,"tag":140,"props":3191,"children":3192},{"style":165},[3193],{"type":25,"value":2465},{"type":20,"tag":140,"props":3195,"children":3196},{"style":147},[3197],{"type":25,"value":2470},{"type":20,"tag":140,"props":3199,"children":3200},{"style":165},[3201],{"type":25,"value":2438},{"type":20,"tag":140,"props":3203,"children":3204},{"style":147},[3205],{"type":25,"value":2479},{"type":20,"tag":140,"props":3207,"children":3208},{"style":236},[3209],{"type":25,"value":1044},{"type":20,"tag":140,"props":3211,"children":3212},{"style":165},[3213],{"type":25,"value":1021},{"type":20,"tag":140,"props":3215,"children":3217},{"class":142,"line":3216},73,[3218,3222,3226,3230],{"type":20,"tag":140,"props":3219,"children":3220},{"style":153},[3221],{"type":25,"value":2496},{"type":20,"tag":140,"props":3223,"children":3224},{"style":165},[3225],{"type":25,"value":2095},{"type":20,"tag":140,"props":3227,"children":3228},{"style":147},[3229],{"type":25,"value":2505},{"type":20,"tag":140,"props":3231,"children":3232},{"style":165},[3233],{"type":25,"value":2510},{"type":20,"tag":140,"props":3235,"children":3237},{"class":142,"line":3236},74,[3238,3242,3246],{"type":20,"tag":140,"props":3239,"children":3240},{"style":165},[3241],{"type":25,"value":2519},{"type":20,"tag":140,"props":3243,"children":3244},{"style":147},[3245],{"type":25,"value":2524},{"type":20,"tag":140,"props":3247,"children":3248},{"style":165},[3249],{"type":25,"value":244},{"type":20,"tag":140,"props":3251,"children":3253},{"class":142,"line":3252},75,[3254],{"type":20,"tag":140,"props":3255,"children":3256},{"style":153},[3257],{"type":25,"value":2537},{"type":20,"tag":140,"props":3259,"children":3261},{"class":142,"line":3260},76,[3262,3266,3270,3274],{"type":20,"tag":140,"props":3263,"children":3264},{"style":165},[3265],{"type":25,"value":2546},{"type":20,"tag":140,"props":3267,"children":3268},{"style":147},[3269],{"type":25,"value":546},{"type":20,"tag":140,"props":3271,"children":3272},{"style":236},[3273],{"type":25,"value":239},{"type":20,"tag":140,"props":3275,"children":3276},{"style":165},[3277],{"type":25,"value":244},{"type":20,"tag":140,"props":3279,"children":3281},{"class":142,"line":3280},77,[3282,3286,3290,3294,3298,3302,3306,3310,3314,3318,3322],{"type":20,"tag":140,"props":3283,"children":3284},{"style":165},[3285],{"type":25,"value":2567},{"type":20,"tag":140,"props":3287,"children":3288},{"style":147},[3289],{"type":25,"value":752},{"type":20,"tag":140,"props":3291,"children":3292},{"style":165},[3293],{"type":25,"value":3173},{"type":20,"tag":140,"props":3295,"children":3296},{"style":890},[3297],{"type":25,"value":3029},{"type":20,"tag":140,"props":3299,"children":3300},{"style":165},[3301],{"type":25,"value":3034},{"type":20,"tag":140,"props":3303,"children":3304},{"style":890},[3305],{"type":25,"value":893},{"type":20,"tag":140,"props":3307,"children":3308},{"style":147},[3309],{"type":25,"value":1699},{"type":20,"tag":140,"props":3311,"children":3312},{"style":236},[3313],{"type":25,"value":1151},{"type":20,"tag":140,"props":3315,"children":3316},{"style":147},[3317],{"type":25,"value":1699},{"type":20,"tag":140,"props":3319,"children":3320},{"style":402},[3321],{"type":25,"value":988},{"type":20,"tag":140,"props":3323,"children":3324},{"style":165},[3325],{"type":25,"value":3059},{"type":20,"tag":140,"props":3327,"children":3329},{"class":142,"line":3328},78,[3330],{"type":20,"tag":140,"props":3331,"children":3332},{"style":165},[3333],{"type":25,"value":2615},{"type":20,"tag":140,"props":3335,"children":3337},{"class":142,"line":3336},79,[3338],{"type":20,"tag":140,"props":3339,"children":3340},{"style":165},[3341],{"type":25,"value":2624},{"type":20,"tag":140,"props":3343,"children":3345},{"class":142,"line":3344},80,[3346,3350],{"type":20,"tag":140,"props":3347,"children":3348},{"style":153},[3349],{"type":25,"value":1982},{"type":20,"tag":140,"props":3351,"children":3352},{"style":165},[3353],{"type":25,"value":2637},{"type":20,"tag":140,"props":3355,"children":3357},{"class":142,"line":3356},81,[3358],{"type":20,"tag":140,"props":3359,"children":3360},{"style":165},[3361],{"type":25,"value":2001},{"type":20,"tag":140,"props":3363,"children":3365},{"class":142,"line":3364},82,[3366],{"type":20,"tag":140,"props":3367,"children":3368},{"style":165},[3369],{"type":25,"value":776},{"type":20,"tag":97,"props":3371,"children":3373},{"id":3372},"usage-1",[3374],{"type":25,"value":782},{"type":20,"tag":128,"props":3376,"children":3378},{"className":130,"code":3377,"language":132,"meta":133,"style":133},"var size = JsonEstimator.Estimate(damien, true);\n",[3379],{"type":20,"tag":136,"props":3380,"children":3381},{"__ignoreMap":133},[3382],{"type":20,"tag":140,"props":3383,"children":3384},{"class":142,"line":143},[3385,3389,3393,3397,3402,3407,3412,3417],{"type":20,"tag":140,"props":3386,"children":3387},{"style":186},[3388],{"type":25,"value":873},{"type":20,"tag":140,"props":3390,"children":3391},{"style":165},[3392],{"type":25,"value":878},{"type":20,"tag":140,"props":3394,"children":3395},{"style":147},[3396],{"type":25,"value":546},{"type":20,"tag":140,"props":3398,"children":3399},{"style":165},[3400],{"type":25,"value":3401}," JsonEstimator.",{"type":20,"tag":140,"props":3403,"children":3404},{"style":402},[3405],{"type":25,"value":3406},"Estimate",{"type":20,"tag":140,"props":3408,"children":3409},{"style":165},[3410],{"type":25,"value":3411},"(damien, ",{"type":20,"tag":140,"props":3413,"children":3414},{"style":236},[3415],{"type":25,"value":3416},"true",{"type":20,"tag":140,"props":3418,"children":3419},{"style":165},[3420],{"type":25,"value":3421},");\n",{"type":20,"tag":80,"props":3423,"children":3425},{"id":3424},"wrap-up",[3426],{"type":25,"value":3427},"Wrap-up",{"type":20,"tag":21,"props":3429,"children":3430},{},[3431,3433,3439,3441,3447],{"type":25,"value":3432},"I also had the chance to play with Benchmark.NET and also to look at various optimizations of the estimator (using ",{"type":20,"tag":136,"props":3434,"children":3436},{"className":3435},[],[3437],{"type":25,"value":3438},"Stack\u003CT>",{"type":25,"value":3440}," instead of a recursion, reducing ",{"type":20,"tag":136,"props":3442,"children":3444},{"className":3443},[],[3445],{"type":25,"value":3446},"foreach",{"type":25,"value":3448}," allocations and a simpler switch that did not involve pattern matching) but none of them yielded positive results on my test set - I likely need a bigger set of objects to see the real benefits.",{"type":20,"tag":21,"props":3450,"children":3451},{},[3452],{"type":25,"value":3453},"Regards,",{"type":20,"tag":21,"props":3455,"children":3456},{},[3457],{"type":25,"value":3458},"[)amien",{"type":20,"tag":3460,"props":3461,"children":3462},"style",{},[3463],{"type":25,"value":3464},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":133,"searchDepth":182,"depth":182,"links":3466},[3467,3472,3477],{"id":82,"depth":182,"text":85,"children":3468},[3469,3470,3471],{"id":99,"depth":197,"text":102},{"id":123,"depth":197,"text":126},{"id":779,"depth":197,"text":782},{"id":900,"depth":182,"text":903,"children":3473},[3474,3475,3476],{"id":911,"depth":197,"text":102},{"id":929,"depth":197,"text":126},{"id":3372,"depth":197,"text":782},{"id":3424,"depth":182,"text":3427},"markdown","content:blog:2022:estimating-json-size.md","content","blog/2022/estimating-json-size.md","blog/2022/estimating-json-size","md","/blog/2022/estimating-json-size/",1031,[3487,3491,3495],{"title":3488,"date":3489,"url":3490},"HTML5 Video Cheatsheet: Optimizing videos for the web","2025-12-05T00:00:00Z","/blog/2025/html5-video-cheatsheet/",{"title":3492,"date":3493,"url":3494},"Transactions in the MongoDB EF Core Provider","2025-10-25","/blog/2025/mongodb-explicit-transactions/",{"title":3496,"date":3497,"url":3498},"Queryable Encryption with the MongoDB EF Core Provider","2025-09-22","/blog/2025/mongodb-queryable-encryption/",[3500,3689],{"_path":3501,"_dir":3502,"_draft":6,"_partial":6,"_locale":7,"title":3503,"description":3504,"id":3503,"date":3505,"name":3506,"email":3507,"avatar":3508,"url":3507,"body":3509,"_type":3478,"_id":3686,"_source":3480,"_file":3687,"_stem":3688,"_extension":3483},"/comments/estimating-json-size/183de65b","estimating-json-size","183de65b","Hi, probably there is bug in  Estimate(...) method. In my case, I have nested dictionaries in objects. However, using provided code, calculations are too low (~600 bytes when HTTP response with json object is about ~700 KB). What I found and seems that helped, that changing order of these two lines:","2023-05-15T13:49:44.3177494Z","Marcin Bluszcz",null,"https://secure.gravatar.com/avatar/bd305664fb8a9d3cdb7f19c4898c617b?s=80&d=identicon&r=pg",{"type":17,"children":3510,"toc":3684},[3511,3515,3593,3598,3675,3680],{"type":20,"tag":21,"props":3512,"children":3513},{},[3514],{"type":25,"value":3504},{"type":20,"tag":128,"props":3516,"children":3518},{"className":130,"code":3517,"language":132,"meta":133,"style":133},"if (obj is IEnumerable enumerable) return EstimateEnumerable(enumerable, includeNulls);\nif (obj is IDictionary dict) return EstimateDictionary(dict, includeNulls);\n",[3519],{"type":20,"tag":136,"props":3520,"children":3521},{"__ignoreMap":133},[3522,3558],{"type":20,"tag":140,"props":3523,"children":3524},{"class":142,"line":143},[3525,3530,3534,3538,3542,3546,3550,3554],{"type":20,"tag":140,"props":3526,"children":3527},{"style":153},[3528],{"type":25,"value":3529},"if",{"type":20,"tag":140,"props":3531,"children":3532},{"style":165},[3533],{"type":25,"value":1034},{"type":20,"tag":140,"props":3535,"children":3536},{"style":153},[3537],{"type":25,"value":1039},{"type":20,"tag":140,"props":3539,"children":3540},{"style":171},[3541],{"type":25,"value":1946},{"type":20,"tag":140,"props":3543,"children":3544},{"style":165},[3545],{"type":25,"value":1951},{"type":20,"tag":140,"props":3547,"children":3548},{"style":153},[3549],{"type":25,"value":1053},{"type":20,"tag":140,"props":3551,"children":3552},{"style":402},[3553],{"type":25,"value":1960},{"type":20,"tag":140,"props":3555,"children":3556},{"style":165},[3557],{"type":25,"value":1965},{"type":20,"tag":140,"props":3559,"children":3560},{"class":142,"line":182},[3561,3565,3569,3573,3577,3581,3585,3589],{"type":20,"tag":140,"props":3562,"children":3563},{"style":153},[3564],{"type":25,"value":3529},{"type":20,"tag":140,"props":3566,"children":3567},{"style":165},[3568],{"type":25,"value":1034},{"type":20,"tag":140,"props":3570,"children":3571},{"style":153},[3572],{"type":25,"value":1039},{"type":20,"tag":140,"props":3574,"children":3575},{"style":171},[3576],{"type":25,"value":1906},{"type":20,"tag":140,"props":3578,"children":3579},{"style":165},[3580],{"type":25,"value":1911},{"type":20,"tag":140,"props":3582,"children":3583},{"style":153},[3584],{"type":25,"value":1053},{"type":20,"tag":140,"props":3586,"children":3587},{"style":402},[3588],{"type":25,"value":1920},{"type":20,"tag":140,"props":3590,"children":3591},{"style":165},[3592],{"type":25,"value":1925},{"type":20,"tag":21,"props":3594,"children":3595},{},[3596],{"type":25,"value":3597},"to",{"type":20,"tag":128,"props":3599,"children":3601},{"className":130,"code":3600,"language":132,"meta":133,"style":133},"if (obj is IDictionary dict) return EstimateDictionary(dict, includeNulls);\nif (obj is IEnumerable enumerable) return EstimateEnumerable(enumerable, includeNulls);\n",[3602],{"type":20,"tag":136,"props":3603,"children":3604},{"__ignoreMap":133},[3605,3640],{"type":20,"tag":140,"props":3606,"children":3607},{"class":142,"line":143},[3608,3612,3616,3620,3624,3628,3632,3636],{"type":20,"tag":140,"props":3609,"children":3610},{"style":153},[3611],{"type":25,"value":3529},{"type":20,"tag":140,"props":3613,"children":3614},{"style":165},[3615],{"type":25,"value":1034},{"type":20,"tag":140,"props":3617,"children":3618},{"style":153},[3619],{"type":25,"value":1039},{"type":20,"tag":140,"props":3621,"children":3622},{"style":171},[3623],{"type":25,"value":1906},{"type":20,"tag":140,"props":3625,"children":3626},{"style":165},[3627],{"type":25,"value":1911},{"type":20,"tag":140,"props":3629,"children":3630},{"style":153},[3631],{"type":25,"value":1053},{"type":20,"tag":140,"props":3633,"children":3634},{"style":402},[3635],{"type":25,"value":1920},{"type":20,"tag":140,"props":3637,"children":3638},{"style":165},[3639],{"type":25,"value":1925},{"type":20,"tag":140,"props":3641,"children":3642},{"class":142,"line":182},[3643,3647,3651,3655,3659,3663,3667,3671],{"type":20,"tag":140,"props":3644,"children":3645},{"style":153},[3646],{"type":25,"value":3529},{"type":20,"tag":140,"props":3648,"children":3649},{"style":165},[3650],{"type":25,"value":1034},{"type":20,"tag":140,"props":3652,"children":3653},{"style":153},[3654],{"type":25,"value":1039},{"type":20,"tag":140,"props":3656,"children":3657},{"style":171},[3658],{"type":25,"value":1946},{"type":20,"tag":140,"props":3660,"children":3661},{"style":165},[3662],{"type":25,"value":1951},{"type":20,"tag":140,"props":3664,"children":3665},{"style":153},[3666],{"type":25,"value":1053},{"type":20,"tag":140,"props":3668,"children":3669},{"style":402},[3670],{"type":25,"value":1960},{"type":20,"tag":140,"props":3672,"children":3673},{"style":165},[3674],{"type":25,"value":1965},{"type":20,"tag":21,"props":3676,"children":3677},{},[3678],{"type":25,"value":3679},"Reason of this behaviour is obvious - IDictionary is IEnumerable, so second \"if\" statement what never reached.",{"type":20,"tag":3460,"props":3681,"children":3682},{},[3683],{"type":25,"value":3464},{"title":133,"searchDepth":182,"depth":182,"links":3685},[],"content:comments:estimating-json-size:183de65b.md","comments/estimating-json-size/183de65b.md","comments/estimating-json-size/183de65b",{"_path":3690,"_dir":3502,"_draft":6,"_partial":6,"_locale":7,"title":3691,"description":3692,"id":3693,"date":3694,"name":3695,"email":3507,"avatar":3696,"url":3507,"body":3697,"_type":3478,"_id":3726,"_source":3480,"_file":3727,"_stem":3728,"_extension":3483},"/comments/estimating-json-size/d1d418eb","D1d418eb","Very nice and useful piece of code, thanks. Just wanted to mention that the length calculation of left side of decimals is wrong.","d1d418eb","2023-03-21T05:53:47.3686093Z","rifat","https://github.com/rifatx.png",{"type":17,"children":3698,"toc":3724},[3699,3703],{"type":20,"tag":21,"props":3700,"children":3701},{},[3702],{"type":25,"value":3692},{"type":20,"tag":21,"props":3704,"children":3705},{},[3706,3708,3714,3716,3722],{"type":25,"value":3707},"Instead of ",{"type":20,"tag":136,"props":3709,"children":3711},{"className":3710},[],[3712],{"type":25,"value":3713},"left = (long)Math.Floor(dec % 10)",{"type":25,"value":3715},", something like ",{"type":20,"tag":136,"props":3717,"children":3719},{"className":3718},[],[3720],{"type":25,"value":3721},"left = ((long)dec).ToString(CultureInfo.InvariantCulture).Length",{"type":25,"value":3723}," would be more precise.",{"title":133,"searchDepth":182,"depth":182,"links":3725},[],"content:comments:estimating-json-size:d1d418eb.md","comments/estimating-json-size/d1d418eb.md","comments/estimating-json-size/d1d418eb",1779224631651]