Skip to content

Instantly share code, notes, and snippets.

@Zheaoli
Last active January 24, 2025 13:35
Show Gist options
  • Save Zheaoli/783c58605dc4ec231cd611b63328e961 to your computer and use it in GitHub Desktop.
Save Zheaoli/783c58605dc4ec231cd611b63328e961 to your computer and use it in GitHub Desktop.

假定我们现在给出一个类 JSON 字符串,{"abc":1 请判断其中的 {}[] 是否符合 JSON 格式。如果不符合,请返回第一个不匹配位置的 index。例如 {"abc":1 返回 为 0

注1: 假定我们已经正确处理 JSON 字符串中的 ",:

注2: 请自行构造输入和输出

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment