Practice ยท 3 of 3
Safe JSON Layer
Write parseOr(raw, fallback) โ parse raw as JSON, RETURN the value or fallback on any failure (never throws; handles non-string inputs). Write serialize(value, fallback) โ RETURN the JSON string of value, or fallback when the value cannot be serialized (circular references, BigInt).
Difficulty: intermediate
Press Submit to check your solution.
Back to lesson: Practice: Boundaries โ Practice