Notes › Tech Notes › 84 Field Names Across 7 Tabs: 2nd_field Comes in 6 Spellings and 5 Switches Move Only the Java Column

84 Field Names Across 7 Tabs: 2nd_field Comes in 6 Spellings and 5 Switches Move Only the Java Column

An 84-cell field-name truth table, the 6 spellings of 2nd_field, 6 reserved-word lists holding 334 entries, and a byte ledger of 12 switches: every figure on the JSON-to-code page was measured on the spot.

The 7 tabs are driven by a single table

All 7 tabs hang off one lookup table called JL_LANGS; its last row, schema, carries the extension json, and a root named Root comes out of the generator as Root.json. The whole template measures 87841 bytes across 2053 lines and pulls in no third-party dependency.

The tool itself is JSON to Code; when you only want to tidy indentation, the article sends you to JSON Formatter. Here we keep score of what the generator produces and nothing else. Two rulers hide inside the language table: JL_STYLE splits the columns into four naming regimes, camel for three of them (ts, java, dart), pascal for two (cs, go), snake for py and raw for schema; JL_START_PREFIX decides what pads an identifier that would otherwise start on the wrong foot: dart takes a lowercase x, go takes an uppercase X, and the remaining five get a leading underscore, because a go identifier only accepts the letters A through Z as its opening character.

The 84-cell field-name truth table

Every one of the 12 awkward keys is pushed cell by cell through jlIdentFor, and each cell starts against a fresh used set, so no earlier rename leaks into the next column. 12 keys x 7 languages = 84 cells: the schema column keeps all 12 keys in their original spelling, while the remaining 72 cells run the full chain from first-character padding to reserved-word dodge; adding up, for every key, how many of its cells differ from one another gives 42. The most scattered entry is 2nd_field, whose six spellings head the first row of the table below. A sequence counter is only appended when two renamed fields genuinely collide: UserName2, UserName3.

Keytsjavacsgopydartschema
2nd_field_2ndField_2ndField_2NdFieldX2NdField_2nd_fieldx2ndField2nd_field
classclassValueclassValueClassClassclass_classValueclass
_id_id_idIdIdidxId_id
12 keys x 7 languages = 84 cells schema column: 12 as-is 72 cells clear the three gates

Figure 1, the accounting behind the 84 cells.

Six reserved-word tables holding 334 entries

JL_RESERVED ships six tables with these entry counts: ts 62, java 51, cs 78, go 42, py 38, dart 63, which adds up to 334; schema owns no table at all, so every key passes through untouched. The pascal regime capitalizes the first letter before the lookup, yet the table it searches is written entirely in lowercase, and that is exactly why the capitalized Class lands outside the dodge list for cs and go. Calling jlFixReserved('class', 'schema') by hand would throw a TypeError, but the page returns early for schema and never reaches that branch.

Three rulers on the type-name chain

The first ruler is singularization: jlSingularize only accepts pure ASCII words at least four letters long, and it branches on ies, then sis/xis, then es, then ss/us/is/as, then a bare trailing s, so policies becomes policy and news becomes new while children, data and status stay exactly as written; array element types go through singularization and object types are left alone. The second ruler is the banned-type list: JL_BANNED_TYPE carries 37 entries, and a hit is padded with a suffix once only, which turns List into ListItem without an endless cascade. The third ruler is the collision counter: clashing model names become User2, User3 in order of appearance, and a name that starts on a digit gets a T in front, so 2abc is emitted as T2Abc.

The numeric boundary sits at 2147483647

jlBig is a single line, node.big || node.intMax > 2147483647, and the big flag is raised in two situations: after the sign and the decimal point are stripped the digit run exceeds 16 characters, or the absolute value passes 9007199254740991. The boundary was measured directly: 2147483647 still reads false while 2147483648 flips to true; feed in 9007199254740993 and intMax reads it back as 9007199254740992 while marking the node big, because the value has already left the range where every integer is exact.

The precise-decimal mode only replaces type names in three columns: java switches to BigDecimal, cs to decimal and py to Decimal; go still writes float64 and merely picks up one extra note, ts stays number and dart stays double no matter what, and schema is never touched. Under the automatic mode the same sample batch lands differently per column: java receives int, long, long, double, double, int; go receives int, int64, int64, float64, float64, int; while py and dart keep 2147483648 as a plain int anyway.

The byte ledger of 12 switches: five only move the Java column

Against one fixed sample, each switch is measured as checked minus unchecked, one entry at a time:

SwitchByte deltaLine deltaColumn it moves
lombok-2075-131Java
getter/setter+2127+136Java
toString+648+20Java
equals+1567+46Java
import header+78+3Java
output commentsjava +207, cs +327+4, +6five columns
all nullablets +120, go +162, py +130, dart +30six columns

Those five switches leave the other six columns at zero for both deltas whether ticked or not, so a reader who never touches Java can ignore them completely. Output comments reach only five columns, because dart and schema never emit them, and the sort switch changes no bytes in any column at all: it shuffles line order everywhere except schema, where even the order is fixed.

Six spellings of all-nullable and four file headers

The same all-nullable setting renders six different ways: java only wraps its scalar types into boxed equivalents and leaves List untouched; cs adds a question mark after scalars and stacks another one on the whole generic wrapper; go puts a pointer only on plain value types such as *int, while slices and maps stay bare; py wraps both scalars and arrays in Optional; dart appends a question mark and never decorates dynamic; ts appends a question mark, then brackets the union, and a type that already includes null does not stack a second null on top of it.

The four header families, quoted word for word: a java file opens with import java.util.List;, the decimal setting swaps in import java.math.BigDecimal;, and ticking Lombok adds import lombok.Data;; the cs file keeps the JsonSerializer using hint as a comment on its third line; a go file opens with package main; a py file opens with from dataclasses import dataclass, and the pydantic setting replaces that line with from pydantic import BaseModel, ConfigDict, Field. Those headers alone move the ledger by cs +123, go +14 and py +75 bytes.

Two ledgers and three ceilings on the statistics bar

The statistics bar counts by characters rather than bytes: the Chinese-key sample reports chars=23 while the same text really weighs 43 bytes, and the page still prints the size as 23 B. Feed it 1000 Chinese ideographs and the bar displays 1008 B, although the byte-true reading would be 2.9 KB. The human-size boundaries inside jlHumanSize step through 1023 B, 1.0 KB, 10 KB and 1.00 MB.

Give the panel 300 mutually distinct shapes and it produces 300 warnings; the 400 ceiling is never reached, the panel renders 40 rows, and the closing line states that another 260 hints went unshown. Pushing chars to 2100008 crosses 2097152, and the oversized warning pops a single time rather than once per render. One failing parse reported 18 messages, with rows and columns numbered from one: input like {"a":1,} answers that the property name at row 1, column 8 must be wrapped in double quotes. Which keys get swallowed from the output is analyzed in the earlier article on swallowed keys, whose conclusions are not repeated here. The whole ledger stops at the string and innerHTML layer: no browser was opened and no compiler installed, so rendering, timing, compilation and clipboard behavior are all left unverified.

Q: If all 5 Java switches are ticked, do the other six columns change?

A: No, both deltas stay at zero in every other column. The only movement is lombok at -2075 bytes, which shrinks the file instead of growing it because the accessor block it replaces is skipped as a whole.

Q: What does the precise-decimal mode actually change?

A: Only the type names in the java, cs and py columns; go picks up one extra note, and ts, dart and schema come out identical to the automatic mode.

Q: Does switching language re-parse the JSON?

A: No. Running the same input string through jlModel twice returns the same object, and changing the language only re-runs the type-name chain and the coloring pass.

📎 Related articles

Is Pasted-Back SQL Byte-Identical After Formatting: 8 String Syntaxes Cross-Checked, 2 Unclosed Backticks Paired Silently 2026-11-20 Excel to JSON trusts only two numeric regexes: 0012 becomes 12, 1e5 stays a string, and the 8-cell switch matrix lands between 99 and 192 bytes 2026-11-20 A YAML alias is a copy: 10 references expand to 697 characters, and on a name clash own beats merged 2026-11-20 3.7 becomes 3 and 1e3 becomes 1: this fraction calculator truncates at the input, then switches display rules at 14 characters 2026-11-14 The cut lands on the last dot only: archive.tar.gz yields gz, photo. and .gitignore share one cell, and the rebuilt column drops a dot 2026-11-14