Problem Description

Given a JSON object, print the same object but with keys sorted alphabetically at every level (recursive). Output should be JSON string.

Input Format

One line JSON object.

Output Format

One line canonical JSON.

Sample Test Case

Input:
{"b":1,"a":{"d":2,"c":1}}
Output:
{"a":{"c":1,"d":2},"b":1}

Constraints

Total keys across nesting up to 2e5.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next