Skip to content

YAGIRO practice

Find two JSON names that decode to the same word

A ladder-desk slip appears to contain a ticket and two different tray fields. Find the collision, then use the labeled paper slip to recover the meaning of both entries.

Read the original as text

Open tray-slip-original.json in a plain-text view. Keep the file as supplied. A viewer that first converts the object to a dictionary may show only one of the two tray entries.

Look at the second and third names on ticket L4. One is written as tray. The other contains the escape sequence \u0061 in place of the letter a. Decoding produces tray a second time.

Try the original in the converter

Paste the original array into the array-to-lines converter. It refuses the repeated name. It cannot assign upper and lower to two distinct named fields in this object.

RFC 8259 recommends unique member names. Readers can handle repeats differently, including retaining only the last occurrence. Keep the original spelling and both values available while you investigate the source.

Consult the paper slip

Read paper-slip.txt. The second position is labeled Pickup tray and the third Return tray. That distinction gives you a reason to keep both values and to choose two distinct names.

Open tray-slip-revised.json alongside the slip. Confirm that pickupTray is upper and returnTray is lower for ticket L4. A guessed suffix would distinguish two names without explaining which tray to use.

Rerun and record the result

Convert the revised array. You should get one JSON Lines record containing the ticket and both tray assignments. Read it by name to check that the correction matches the paper slip.

Keep the original reference, the paper evidence and the rerun result together. When a slip lacks those labels, leave the intended meanings open until another source can distinguish them.

Files for this exercise

Fictional JSON and JSON Lines practice data. Use the file labeled as input in the tool. The answer files describe accepted results or expected refusals; compare them with your result.

Reference sources

Continue with a check