Problem Description

Parse a JSON string safely and print an error message on failure.

Input Format

stdin: one line JSON text.

Output Format

Print JSON keys count or error.

Sample Test Case

Input:
{\"a\":1,\"b\":2}
Output:
2

Constraints

Handle invalid JSON without crashing.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next