Skip to content

Use common JSON schema for all classifications #5

Description

@trthatcher

For consistency, all classifications should follow the same JSON schema. This is the proposed format:

{
    "standard_id": "",
    "version_id": "",
    "name": {
        "en": "English Name",
        "fr": "French Name"
    },
    "abbreviation": {
        "en": "English Abbreviation",
        "fr": "French Appreviation"
    },
    "effective_date": "YYYY-MM-DD",
    "properties": [
        {
            "property_id": 1,
            "name": {
                "en": "English Name",
                "fr": "French Name"
            }
        }
    ],
    "hierarchies": [
        {
            "hierarchy_id": "HH",
            "name": {
                "en": "English Name",
                "fr": "French Name"
            },
            "levels": [
                {
                    "level": 1,
                    "name": {
                        "en": "",
                        "fr": ""
                    }
                }
            ],
            "codes": [
                {
                    "code": "XX",
                    "name": {
                        "en": "English Name",
                        "fr": "French Name"
                    },
                    "level": 1,
                    "parent_code": "YY"
                }
            ]
        }
    ],
    "codes": [
        {
            "code": "XX",
            "name": {
                "en": "English Name",
                "fr": "French Name"
            },
            "hierarchies": [
                {
                    "hierarchy_id": "HH",
                    "level": 1,
                    "parent_code": "YY"
                }
            ],
            "properties": [
                {
                    "property_id": 1,
                    "value": "XX"
                }
            ],
            "remarks": {
                "en": ["en1", "en2"],
                "fr": ["fr1", "fr2"]
            },
            "elements": [
                {
                    "element_id": 1,
                    "values": {
                        "en": ["en1", "en2"],
                        "fr": ["fr1", "fr2"]
                    }
                }
            ]
        }
    ]
}

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions