Reported July 2026
Kikoffstring

JSON Identity Verification

Reported by candidates from Kikoff's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Kikoff OA. Under 2s to a working solution.
Founder's read

The mistake that sinks a first attempt at Kikoff's JSON Identity Verification question is normalizing the data. Candidates trim, lowercase, or reformat dates because it feels like what a real verifier would do. The spec says compare exactly. This one was reported in July 2026, and it's a parsing and validation problem with a tiny comparison step at the end. You parse providerJson, check the exact path and types, compare four strings, and emit a canonical result string. Nothing about it is hard. Everything about it is easy to get subtly wrong. If you blank on the edge cases during the live OA, StealthCoder is the safety net that reads the spec and hands you a clean solution.

The problem

Implement identity verification for one provider response. The array expected contains exactly four strings in this order: first name, last name, date of birth, and Social Security number.
The string providerJson must be a valid JSON object with this required structure:
{"response":{"identity":{"first_name":"...","last_name":"...","date_of_birth":"...","ssn":"..."},"error_codes":["..."]}}
Object keys may appear in any order, insignificant JSON whitespace is allowed, and unrelated extra fields are ignored. Each required identity value must be a JSON string, and error_codes must be an array containing only strings.
Compare all four identity values exactly as supplied. Do not trim whitespace, fold letter case, or reformat dates or Social Security numbers.
Return one canonical JSON string with a boolean verified field followed by a reasons array. If either the JSON syntax or any required path or type is invalid, return only the reason malformed_json. Otherwise append applicable reasons in this exact order:
first_name
last_name
date_of_birth
ssn
provider_error, once when error_codes is non-empty
Set verified to true exactly when the reason list is empty. The returned string contains no spaces.

Function
verifyIdentity(expected: String[], providerJson: String) → String

Examples
Example 1
expected = ["Ada","Lovelace","1815-12-10","123-45-6789"]
providerJson = "{\"response\":{\"identity\":{\"first_name\":\"Ada\",\"last_name\":\"Lovelace\",\"date_of_birth\":\"1815-12-10\",\"ssn\":\"123-45-6789\"},\"error_codes\":[]}}"
return = "{\"verified\":true,\"reasons\":[]}"
Every required provider value exactly matches the corresponding expected string, and the provider supplied no error code, so verification succeeds.
Example 2
expected = ["Grace","Hopper","1906-12-09","111-22-3333"]
providerJson = "{\"response\":{\"error_codes\":[\"UPSTREAM_TIMEOUT\"],\"identity\":{\"ssn\":\"999-88-7777\",\"date_of_birth\":\"1906-12-09\",\"last_name\":\"hopper\",\"first_name\":\"Grace\"}}}"
return = "{\"verified\":false,\"reasons\":[\"last_name\",\"ssn\",\"provider_error\"]}"
The last name differs because comparison is case-sensitive, the Social Security number differs, and the non-empty provider error list adds one final provider_error reason.
Example 3
expected = ["Alan","Turing","1912-06-23","222-33-4444"]
providerJson = "{\"response\":{\"identity\":{\"first_name\":\"Alan\"},\"error_codes\":[]}}"
return = "{\"verified\":false,\"reasons\":[\"malformed_json\"]}"
The JSON syntax is valid, but required identity fields are missing. The response therefore follows the malformed-input result and does not attempt partial comparison.

Constraints
expected.length == 4.
Each expected identity string has length from 0 through 100.
1 <= providerJson.length <= 10^5.
providerJson contains valid Unicode text and may contain any JSON value before structural validation.
A structurally valid provider response has unique object keys, the required object path shown above, four required string identity values, and a string-only error_codes array.
The canonical result contains only the fixed reason codes defined above.

Reported by candidates. Source: FastPrep

Pattern and pitfall

The pattern is string handling plus strict validation. Step one: parse providerJson with a real JSON parser inside a try/catch. Any syntax error returns malformed_json. Step two: walk response, then identity, then the four keys, then error_codes. Check each is the right type. Identity values must be strings, and error_codes must be an array where every element is a string. Any miss returns only malformed_json, with no partial comparison. Step three: compare with plain equality, no trim, no case folding. Append reasons in the fixed order: first_name, last_name, date_of_birth, ssn, then provider_error if error_codes is non-empty. Build the output by hand with no spaces, since a serializer may add them. The common pitfall is returning mismatch reasons alongside malformed_json. Another is forgetting that the top-level value might not be an object at all. StealthCoder is your hedge in the live OA if the type checks slip your mind.

The honest play: practice the pattern, and have StealthCoder ready for the one you didn't see coming.

If this hits your live OA

You can drill JSON Identity Verification cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Built for the candidate who saw this exact problem leak two days before his OA and wondered if anyone had a play.

Get StealthCoder
⏵ The honest play

You've seen the question. Make sure you actually pass Kikoff's OA.

Kikoff reuses patterns across OAs. Built for the candidate who saw this exact problem leak two days before his OA and wondered if anyone had a play. Works on HackerRank, CodeSignal, CoderPad, and Karat.

JSON Identity Verification FAQ

What's the trick in the Kikoff JSON Identity Verification problem?+

Be strict twice. First, validate structure and types before comparing anything, and return only malformed_json on failure. Second, compare strings exactly with no trimming, case folding, or reformatting. Most failed attempts normalize data or mix malformed_json with other reasons.

How hard is this OA really?+

Easy on algorithms, annoying on details. There's no data structure or complexity puzzle. You lose points on type checks, reason ordering, and output formatting. Plan on careful reading and a handful of edge-case tests rather than clever thinking.

Can I use a built-in JSON parser?+

Yes, the input is standard JSON, so use your language's parser inside error handling. Syntax errors map to malformed_json. After parsing, verify yourself that each level is an object and each required value has the right type, because valid JSON can still be the wrong shape.

How should I format the output string?+

The result must be canonical with no spaces: verified first, then reasons, like {"verified":false,"reasons":["ssn"]}. Reason codes are fixed strings, so building the string by hand is safest. Some serializers add spaces by default, which would fail the comparison.

How do I prepare for this in 48 hours?+

Write the validator once, then test edge cases: empty strings, missing keys, wrong types, a non-string inside error_codes, a top-level array, and mismatched case. Check reason order on a case where all four fields differ plus an error code. That covers nearly everything this problem tests.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Kikoff.

OA at Kikoff?
Invisible during screen share
Get it