Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transforming JSON into Dict #9

Open
Leticia-maria opened this issue Jun 6, 2024 · 1 comment
Open

Transforming JSON into Dict #9

Leticia-maria opened this issue Jun 6, 2024 · 1 comment

Comments

@Leticia-maria
Copy link
Member

@ChrisTimperley Have you ever tried using this package to transform JSON files into Dict: https://quinnj.github.io/JSON3.jl/stable/#JSONTables.jl I am having trouble because my JSON file is nested like this:

{
  "2zapa-nr": {
    "display_name": "2ZaPa-NR",
    "other_names": [],
    "description": "Double Zeta augmented + polarization (nonrelativistic)",
    "latest_version": "1",
    "tags": [],
    "basename": "2ZaPa-NR",
    "relpath": "",
    "family": "ranasinghe",
    "role": "orbital",
    "function_types": [
      "gto",
      "gto_spherical"
    ],
    "auxiliaries": {},
    "versions": {
      "0": {
        "file_relpath": "2ZaPa-NR.0.table.json",
        "revdesc": "Data from the original Basis Set Exchange",
        "revdate": "2016-07-11",
        "elements": [
          "1",
          "2",
          "3",
          "4",
          "5",
          "6",
          "7",
          "8",
          "9",
          "10",
          "11",
          "12",
          "13",
          "14",
          "15",
          "16",
          "17",
          "18"
        ]
      },
      "1": {
        "file_relpath": "2ZaPa-NR.1.table.json",
        "revdesc": "Data from Supplemental Information of publications",
        "revdate": "2019-06-10",
        "elements": [
          "1",
          "2",
          "3",
          "4",
          "5",
          "6",
          "7",
          "8",
          "9",
          "10",
          "11",
          "12",
          "13",
          "14",
          "15",
          "16",
          "17",
          "18"
        ]
      }
    }
  },
  "2zapa-nr-cv": {
    "display_name": "2ZaPa-NR-CV",
    "other_names": [],
    "description": "Double zeta augmented +polarization (nonrelativistic + core-valence)",
    "latest_version": "1",
    "tags": [],
    "basename": "2ZaPa-NR-CV",
    "relpath": "",
    "family": "ranasinghe",
    "role": "orbital",
    "function_types": [
      "gto",
      "gto_spherical"
    ],
    "auxiliaries": {},
    "versions": {
      "0": {
        "file_relpath": "2ZaPa-NR-CV.0.table.json",
        "revdesc": "Data from the original Basis Set Exchange",
        "revdate": "2017-10-11",
        "elements": [
          "1",
          "2",
          "3",
          "4",
          "5",
          "6",
          "7",
          "8",
          "9",
          "10",
          "11",
          "12",
          "13",
          "14",
          "15",
          "16",
          "17",
          "18"
        ]
      },
      "1": {
        "file_relpath": "2ZaPa-NR-CV.1.table.json",
        "revdesc": "Data from Supplemental Information of publications (modified)",
        "revdate": "2019-06-11",
        "elements": [
          "1",
          "2",
          "3",
          "4",
          "5",
          "6",
          "7",
          "8",
          "9",
          "10",
          "11",
          "12",
          "13",
          "14",
          "15",
          "16",
          "17",
          "18"
        ]
      }
    }
  },
  "3-21g": {
    "display_name": "3-21G",
    "other_names": [],
    "description": "3-21G Split-valence basis set",
    "latest_version": "1",
    "tags": [],
    "basename": "3-21G",
    "relpath": "",
    "family": "pople",
    "role": "orbital",
    "function_types": [
      "gto",
      "gto_cartesian"
    ],
    "auxiliaries": {},
    "versions": {
      "0": {
        "file_relpath": "3-21G.0.table.json",
        "revdesc": "Data from the Original Basis Set Exchange",
        "revdate": "2016-08-25",
        "elements": [
          "1",
          "2",
          "3",
          "4",
          "5",
          "6",
          "7",
          "8",
          "9",
          "10",
          "11",
          "12",
          "13",
          "14",
          "15",
          "16",
          "17",
          "18",
          "19",
          "20",
          "21",
          "22",
          "23",
          "24",
          "25",
          "26",
          "27",
          "28",
          "29",
          "30",
          "31",
          "32",
          "33",
          "34",
          "35",
          "36",
          "37",
          "38",
          "39",
          "40",
          "41",
          "42",
          "43",
          "44",
          "45",
          "46",
          "47",
          "48",
          "49",
          "50",
          "51",
          "52",
          "53",
          "54",
          "55"
        ]
      },
      "1": {
        "file_relpath": "3-21G.1.table.json",
        "revdesc": "Data from Gaussian 09",
        "revdate": "2019-02-21",
        "elements": [
          "1",
          "2",
          "3",
          "4",
          "5",
          "6",
          "7",
          "8",
          "9",
          "10",
          "11",
          "12",
          "13",
          "14",
          "15",
          "16",
          "17",
          "18",
          "19",
          "20",
          "21",
          "22",
          "23",
          "24",
          "25",
          "26",
          "27",
          "28",
          "29",
          "30",
          "31",
          "32",
          "33",
          "34",
          "35",
          "36",
          "37",
          "38",
          "39",
          "40",
          "41",
          "42",
          "43",
          "44",
          "45",
          "46",
          "47",
          "48",
          "49",
          "50",
          "51",
          "52",
          "53",
          "54",
          "55"
        ]
      }
    }
  },

and it continues... (Link for the file: METADATA.json

@Leticia-maria
Copy link
Member Author

Idea:

  • Read the JSON file and transform into a Dict object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant