<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Josephine Anucia</title>
    <description>The latest articles on DEV Community by Josephine Anucia (@jsoneditorfree).</description>
    <link>https://dev.to/jsoneditorfree</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4199961%2F0cedd435-3b74-4383-b467-024b20b53ad8.png</url>
      <title>DEV Community: Josephine Anucia</title>
      <link>https://dev.to/jsoneditorfree</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jsoneditorfree"/>
    <language>en</language>
    <item>
      <title>3 ways to show a JSON API response in your docs (and keep it readable)</title>
      <dc:creator>Josephine Anucia</dc:creator>
      <pubDate>Sun, 29 Nov 2026 11:05:21 +0000</pubDate>
      <link>https://dev.to/jsoneditorfree/3-ways-to-show-a-json-api-response-in-your-docs-and-keep-it-readable-3kkd</link>
      <guid>https://dev.to/jsoneditorfree/3-ways-to-show-a-json-api-response-in-your-docs-and-keep-it-readable-3kkd</guid>
      <description>&lt;p&gt;Almost every API doc page has the same block: "Example response", followed by 80 lines of JSON that nobody reads&lt;br&gt;
past line 12. Here are three ways to show a response, from the simplest to the most interactive, and when each one&lt;br&gt;
fits.&lt;/p&gt;
&lt;h2&gt;
  
  
  1. A plain code block, trimmed
&lt;/h2&gt;

&lt;p&gt;For short responses this is still the best option. It works everywhere (READMEs, docs generators, blogs), it is&lt;br&gt;
searchable, and readers can copy it.&lt;/p&gt;

&lt;p&gt;Two habits make it much easier to read:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pretty-print with a 2-space indent.&lt;/strong&gt; Four spaces push nested objects off the right edge on phones.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trim arrays to two or three items&lt;/strong&gt; and say so in the text, so readers know it is a sample, not the full shape.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1042&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Desk lamp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"price"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;35.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"inStock"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"tags"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"lighting"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"office"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"dimensions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"heightCm"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;45&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"weightKg"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1.2&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"supplier"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Keep &lt;code&gt;null&lt;/code&gt; fields in the example. A reader who never sees &lt;code&gt;"supplier": null&lt;/code&gt; will write code that breaks on it.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. A &lt;code&gt;&amp;lt;details&amp;gt;&lt;/code&gt; block per section
&lt;/h2&gt;

&lt;p&gt;When a response is long but has clear parts (a &lt;code&gt;data&lt;/code&gt; array, &lt;code&gt;meta&lt;/code&gt;, &lt;code&gt;links&lt;/code&gt;, &lt;code&gt;errors&lt;/code&gt;), fold each part into&lt;br&gt;
an HTML &lt;code&gt;&amp;lt;details&amp;gt;&lt;/code&gt; element. It needs no script, and many Markdown renderers (GitHub included) pass it through.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;details&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;summary&amp;gt;&amp;lt;code&amp;gt;&lt;/span&gt;meta&lt;span class="nt"&gt;&amp;lt;/code&amp;gt;&lt;/span&gt;: paging information&lt;span class="nt"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;

```json
{ "page": 2, "perPage": 20, "total": 134 }
```

&lt;span class="nt"&gt;&amp;lt;/details&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Put the most important part first and open: &lt;code&gt;&amp;lt;details open&amp;gt;&lt;/code&gt;. Check how your docs platform renders it before you&lt;br&gt;
rely on it; some strip raw HTML.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. A collapsible JSON tree in an iframe
&lt;/h2&gt;

&lt;p&gt;For large or deeply nested responses that readers explore rather than read, a tree they can open and close level&lt;br&gt;
by level works better than any static block.&lt;/p&gt;

&lt;p&gt;Disclosure: I made this one. It is a free widget on my site, JSON Editor Free:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;a href="https://jsoneditorfree.com/embed/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=arlen-marketing" rel="noopener noreferrer"&gt;https://jsoneditorfree.com/embed/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=arlen-marketing&lt;/a&gt; and paste your JSON.&lt;/li&gt;
&lt;li&gt;Pick the theme (Auto follows the reader's light or dark setting), how many levels start open, and the height.&lt;/li&gt;
&lt;li&gt;Copy the snippet: one &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt; and one credit line, and paste it into any page that accepts an iframe.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What to know before you use it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Up to 200 KB of JSON per snippet.&lt;/strong&gt; The JSON is compressed into the iframe address, and long addresses fail
in some browsers and content systems.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The JSON goes after the &lt;code&gt;#&lt;/code&gt; in the address,&lt;/strong&gt; and browsers never send that part to a server. The viewer reads
it in the reader's browser. It sets no cookies and shows no ads.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;To change the JSON, make a new snippet.&lt;/strong&gt; Nothing is stored on a server, so there is nothing to update there.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub READMEs do not allow iframes.&lt;/strong&gt; Use option 1 or 2 there.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Which one when
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Response&lt;/th&gt;
&lt;th&gt;Platform&lt;/th&gt;
&lt;th&gt;Use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Under about 30 lines&lt;/td&gt;
&lt;td&gt;anywhere&lt;/td&gt;
&lt;td&gt;1. trimmed code block&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Long, with clear sections&lt;/td&gt;
&lt;td&gt;Markdown that allows HTML (GitHub included)&lt;/td&gt;
&lt;td&gt;2. &lt;code&gt;&amp;lt;details&amp;gt;&lt;/code&gt; per section&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large or deeply nested, meant to be explored&lt;/td&gt;
&lt;td&gt;your own site or a docs platform that allows iframes&lt;/td&gt;
&lt;td&gt;3. collapsible tree&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Whichever you choose, show a real response, not a hand-written one: hand-written examples drift from the API&lt;br&gt;
within a release or two.&lt;/p&gt;

&lt;p&gt;If your response is too big for any of these, here is how to open huge JSON files (hundreds of MB and more) in a&lt;br&gt;
browser: &lt;a href="https://jsoneditorfree.com/docs/large-documents/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=arlen-marketing" rel="noopener noreferrer"&gt;https://jsoneditorfree.com/docs/large-documents/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=arlen-marketing&lt;/a&gt;&lt;/p&gt;

</description>
      <category>json</category>
      <category>webdev</category>
      <category>documentation</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Three bugs that taught us how to build an options dashboard on Cloudflare Workers</title>
      <dc:creator>Josephine Anucia</dc:creator>
      <pubDate>Sun, 29 Nov 2026 11:02:08 +0000</pubDate>
      <link>https://dev.to/jsoneditorfree/three-bugs-that-taught-us-how-to-build-an-options-dashboard-on-cloudflare-workers-2a6b</link>
      <guid>https://dev.to/jsoneditorfree/three-bugs-that-taught-us-how-to-build-an-options-dashboard-on-cloudflare-workers-2a6b</guid>
      <description>&lt;p&gt;Option Radar is an options analytics web app for Indian index options (NIFTY, BANKNIFTY): the option chain with Greeks, open interest by strike, change in OI, PCR, max pain and a strategy payoff builder. It looked like a charting project. It turned out to be a data project, and three bugs taught us most of what we know about it.&lt;/p&gt;

&lt;p&gt;First, the constraint that shapes everything: showing exchange market data to the public needs a redistribution licence. So there is no shared feed. Each signed-in user connects their own broker (5paisa, Zerodha, Upstox or Dhan) and the app reads that user's session, for that user only. Every broker returns a different shape, so each adapter maps into one normalised chain, and the OI, PCR and payoff code never knows which broker the numbers came from.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bug 1: the chart that started at 10:13
&lt;/h2&gt;

&lt;p&gt;Charts labelled "through the session" sometimes began at 10:13 or 10:28 instead of the 09:15 open, and an "opening OI" panel found nothing in its window.&lt;/p&gt;

&lt;p&gt;The cause: session history lived in each Worker isolate's memory. Workers start new isolates whenever they like (cold starts, more traffic, another location), and a new isolate starts empty. Two requests from the same user could land on two isolates with two different histories.&lt;/p&gt;

&lt;p&gt;The fix: keep the session in D1. The poller stores each chain read (one row per user, session, underlying, expiry and read time, payload compressed with deflate-raw) in one batched write per cycle. Before any data route runs, the feed "prepares": it loads the newest read of each chain once per session, an underlying's whole session on its first read, and afterwards only the tail and any gap. History is merged without doubling. A new isolate now starts from the open.&lt;/p&gt;

&lt;p&gt;Lesson: on Workers, memory is a cache, never the record. If two requests must agree, the state lives in D1, KV or a Durable Object.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bug 2: implied volatility that disagreed with itself
&lt;/h2&gt;

&lt;p&gt;At the same strike, the call and the put showed implied volatilities several points apart, and some in-the-money calls showed no IV at all.&lt;/p&gt;

&lt;p&gt;We were solving Black-Scholes on the spot with a fixed rate. Index options price off the forward, so carry split calls from puts, and an in-the-money call priced below S - K·e^(-rT) had no solution.&lt;/p&gt;

&lt;p&gt;The fix: Black-76 on the expiry forward. The forward is the futures price for that expiry when one exists, otherwise the put-call parity forward at the at-the-money strike. The solver brackets and bisects, and answers whenever the price is at least intrinsic on the forward. The server and the browser share one implementation, so the two can't drift apart.&lt;/p&gt;

&lt;p&gt;Lesson: if two numbers that should agree don't, check the model before the data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bug 3: one broker's OI was dozens of times bigger
&lt;/h2&gt;

&lt;p&gt;Open interest from one broker was far larger than from the others for the same strike. Nothing was wrong with the numbers: 5paisa reports OI as quantity (lot size times contracts), while others report contracts. We label it in the unit the broker reports, and the normaliser makes the unit part of the data, not an assumption in the chart.&lt;/p&gt;

&lt;p&gt;Lesson: a number without its unit is a bug waiting for a second data source.&lt;/p&gt;

&lt;h2&gt;
  
  
  Public pages that crawlers can read
&lt;/h2&gt;

&lt;p&gt;The app is a React single-page app, and the signed-in screens stay that way (noindex). But the public pages (the docs, one guide per screen, and a free position size calculator) are pre-rendered at build time and hydrated on load, so search engines and AI crawlers get the full text in the first response. One trap there: if the session check answered before a page's lazy chunk loaded, React replaced the pre-rendered HTML with a loading skeleton. Loading the current page's module before &lt;code&gt;hydrateRoot&lt;/code&gt; fixed it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;You can read the docs (&lt;a href="https://optionsradar.in/docs?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=arlen-marketing" rel="noopener noreferrer"&gt;https://optionsradar.in/docs?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=arlen-marketing&lt;/a&gt;) or use the position size calculator, which works in F&amp;amp;O lots with the current NSE index lot sizes (&lt;a href="https://optionsradar.in/tools/position-size-calculator?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=arlen-marketing" rel="noopener noreferrer"&gt;https://optionsradar.in/tools/position-size-calculator?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=arlen-marketing&lt;/a&gt;), without signing up. It's a data tool and gives no investment advice.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I build Option Radar. An AI agent working for me wrote this post from the project's commit history and checked it against the code before publishing.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>cloudflare</category>
      <category>react</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Every number on the page is a test: keeping a tax calculator honest</title>
      <dc:creator>Josephine Anucia</dc:creator>
      <pubDate>Sun, 29 Nov 2026 10:38:28 +0000</pubDate>
      <link>https://dev.to/jsoneditorfree/every-number-on-the-page-is-a-test-keeping-a-tax-calculator-honest-1bl1</link>
      <guid>https://dev.to/jsoneditorfree/every-number-on-the-page-is-a-test-keeping-a-tax-calculator-honest-1bl1</guid>
      <description>&lt;p&gt;Tax calculator sites disagree with each other. Search "old vs new regime calculator" for India and you will find pages that quote different standard deductions and different slabs for the same year. For a calculator, being wrong quietly is the worst failure, because people act on the number.&lt;/p&gt;

&lt;p&gt;When we built Finance Planner Online (a free income tax and in-hand salary planner for India), we set one rule: &lt;strong&gt;no figure is typed into the page by hand.&lt;/strong&gt; Every number a visitor reads comes from the same tax engine the calculator uses, and a test fails if they drift apart.&lt;/p&gt;

&lt;h2&gt;
  
  
  One engine, many surfaces
&lt;/h2&gt;

&lt;p&gt;The engine is a pure TypeScript function, &lt;code&gt;computeTax&lt;/code&gt;, that takes a salary, a regime and deductions and returns tax with cess, surcharge and marginal relief. Everything else calls it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the calculator on the home page,&lt;/li&gt;
&lt;li&gt;the in-hand salary calculator,&lt;/li&gt;
&lt;li&gt;the FAQ answers ("What is the in-hand salary for 15 LPA?"),&lt;/li&gt;
&lt;li&gt;a data page with tax at 25 salaries from ₹5 lakh to ₹50 lakh, and its CSV.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ answers are generated, then pinned
&lt;/h2&gt;

&lt;p&gt;The FAQ text lives in one list. A test recomputes each answer from the engine and compares the strings. If the rules change, the build fails until the answer text is updated, so the page and the structured data can't say something the calculator doesn't.&lt;/p&gt;

&lt;p&gt;Example the tests pin: on a ₹15 lakh salary the new regime gives ₹97,500 tax; the old regime gives ₹1,87,200 even with ₹2,25,000 of deductions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Edge cases that earned their own tests
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The ₹12,75,000 cliff.&lt;/strong&gt; With the ₹75,000 standard deduction and the 87A rebate, ₹12,75,000 pays nothing in the new regime; ₹13,00,000 pays ₹26,000. Marginal relief is what keeps that jump honest.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The PF wage ceiling.&lt;/strong&gt; PF worked out on a ₹25,000 wage ceiling changes take-home: at 12 LPA, PF falls to ₹36,000 a year and in-hand pay rises to ₹93,800 a month. That answer is pinned too.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Provisional years.&lt;/strong&gt; Rules for a year not yet confirmed are flagged in the data, and the page says so.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Pre-rendered, so crawlers read the same numbers
&lt;/h2&gt;

&lt;p&gt;The public pages are rendered at build from the app's own components, so the HTML that search engines and AI assistants read carries the same figures as the live calculator.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we'd do differently
&lt;/h2&gt;

&lt;p&gt;Start with the data table, not the UI. Once the numbers were a tested table, every page became a view on it.&lt;/p&gt;

&lt;p&gt;The data page the tests feed: &lt;a href="https://financeplanneronline.com/income-tax-by-salary?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=arlen-marketing" rel="noopener noreferrer"&gt;https://financeplanneronline.com/income-tax-by-salary?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=arlen-marketing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: our company, TwentyFox, makes Finance Planner Online. This article was written by an AI agent working for us and checked against the code and the live pages. Figures are for FY 2026-27, provisional until the year's Finance Act rules are confirmed; not tax advice.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>testing</category>
      <category>typescript</category>
      <category>react</category>
    </item>
    <item>
      <title>How we open a 4 GB JSON file in a browser tab without running out of memory</title>
      <dc:creator>Josephine Anucia</dc:creator>
      <pubDate>Thu, 22 Oct 2026 08:07:26 +0000</pubDate>
      <link>https://dev.to/jsoneditorfree/how-we-open-a-4-gb-json-file-in-a-browser-tab-without-running-out-of-memory-58df</link>
      <guid>https://dev.to/jsoneditorfree/how-we-open-a-4-gb-json-file-in-a-browser-tab-without-running-out-of-memory-58df</guid>
      <description>&lt;p&gt;Most online JSON tools fall over somewhere between 50 and 500 MB. The reason is simple: &lt;code&gt;JSON.parse&lt;/code&gt; (or any parser&lt;br&gt;
that builds a tree) turns every value into a JavaScript object. We measured our own lossless parser at about 13&lt;br&gt;
bytes of heap for every byte of JSON. Chrome gives a tab a heap of about 4 GB, so the ceiling sat near 300 MB.&lt;/p&gt;

&lt;p&gt;Here is how &lt;a href="https://jsoneditorfree.com/" rel="noopener noreferrer"&gt;JSON Editor Free&lt;/a&gt; now opens files of up to 4 GB.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Never build the tree
&lt;/h2&gt;

&lt;p&gt;Over 100 MB, the file stays a &lt;code&gt;File&lt;/code&gt;. A worker reads it in 8 MB slices (&lt;code&gt;file.slice(a, b).arrayBuffer()&lt;/code&gt;) and feeds&lt;br&gt;
them to a resumable byte tokenizer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It tracks the JSON grammar: objects, arrays, strings, escapes, numbers, literals.&lt;/li&gt;
&lt;li&gt;It reports token offsets to a handler, but never creates a value.&lt;/li&gt;
&lt;li&gt;It is a state machine, so a token can straddle two chunks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That one pass proves the file is valid JSON and reports the line and column if it is not.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Index only what is big
&lt;/h2&gt;

&lt;p&gt;The handler keeps only containers that span 64 KB or more. For each one it records:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;where it starts and ends;&lt;/li&gt;
&lt;li&gt;how many children it has;&lt;/li&gt;
&lt;li&gt;the byte offset of every 64th child.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It also keeps strings of 64 KB or more. For a 1 GB array of 4.6 million records, that index is about 300 KB.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Read rows on demand
&lt;/h2&gt;

&lt;p&gt;Tree view is virtualised, so it only ever asks for "rows 120,400 to 120,480".&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The row model knows which containers are expanded and how many rows each contributes, so it can map a row
number to "children 120,399 to 120,479 of &lt;code&gt;/data&lt;/code&gt;".&lt;/li&gt;
&lt;li&gt;It jumps to the nearest checkpoint (child 120,384) and scans forward a few kilobytes.&lt;/li&gt;
&lt;li&gt;It skips any big child in one step, using the index.&lt;/li&gt;
&lt;li&gt;Each small value is then parsed with the normal lossless parser, so rows look exactly like they do for small
files.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  4. Search without an index
&lt;/h2&gt;

&lt;p&gt;Search is a single streaming pass over the bytes. A tiny state machine knows whether each byte is inside a string,&lt;br&gt;
a number or between tokens, so a match never spans two values. Only the current match is turned into a JSON&lt;br&gt;
pointer, by walking down from the root with the same checkpoints.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Edit a part, not the whole
&lt;/h2&gt;

&lt;p&gt;Editing 4 GB in place is a different project, so huge files are view-only. You can select any value of up to 50 MB&lt;br&gt;
and open it in the other panel as a normal document, with format, sort, transform, compare and save.&lt;/p&gt;

&lt;h2&gt;
  
  
  Results (desktop Chrome, laptop)
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Open (check + index)&lt;/th&gt;
&lt;th&gt;Search&lt;/th&gt;
&lt;th&gt;Renderer memory&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1 GB&lt;/td&gt;
&lt;td&gt;~5–7 s&lt;/td&gt;
&lt;td&gt;~5–8 s&lt;/td&gt;
&lt;td&gt;~400–700 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2 GB&lt;/td&gt;
&lt;td&gt;~11–14 s&lt;/td&gt;
&lt;td&gt;~10–15 s&lt;/td&gt;
&lt;td&gt;~400–700 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4 GB&lt;/td&gt;
&lt;td&gt;~20 s&lt;/td&gt;
&lt;td&gt;~21 s&lt;/td&gt;
&lt;td&gt;~700 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Try it with your own biggest file: &lt;a href="https://jsoneditorfree.com/" rel="noopener noreferrer"&gt;https://jsoneditorfree.com/&lt;/a&gt;. It's free, with no account, and the file is read on&lt;br&gt;
your device.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>performance</category>
      <category>json</category>
    </item>
  </channel>
</rss>
