Because I apparently have a lot of time on my hands (!), I came up with this regular expression to validate JSON.
(?x)
# SUBROUTINES
(?(DEFINE)
(?<num>-? (?:\\d+\\.)? \\d+ (?:e [-+]? \\d+)?)
(?<string>" (?:\\\" | [^"])* ")
(?<key>\\s* (?&string) \\s* : \\s*)
(?<value>\\s* (?:true | false | null | (?&num) | (?&string)) \\s*)
(?<struct>
# Array
\\s*\\[ (?:
(?:(?&struct) \\s* | (?&value))
(?:, (?:(?&struct) \\s* | (?&value)))*
)? \\] |
# Dictionary
\\s*\\{ (?:
(?&key) (?:(?&struct) \\s* | (?&value))
(?:, (?&key) (?:(?&struct) \\s* | (?&value)))*
)? \\}
) # Struct
)
# MAIN
\\s* # Capture any leading whitespace
\\K # Restart the match
(?&struct) # Match it