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

Add JsonWriter #17

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Add JsonWriter #17

wants to merge 1 commit into from

Conversation

jackassmc
Copy link

This PR adds support for writing mappings as JSON files.

@liach
Copy link

liach commented May 7, 2022

i hope there's a spec on the json format.

@jackassmc
Copy link
Author

There isn't one but I can write one. Where should I put it?

In the meantime here is an example of the format:

{
    "type": "mapping",
    "version": 1,
    "namespaces": ["source", "dest1", "dest2"],
    "meta": {
        "key": "value"
    },
    "classes": [
        {
            "name": ["sourceName", "dest1name", "dest2name"],
            "fields": [
                {
                    "name": ["sourceName", "dest1name", "dest2name"],
                    "desc": "desc",
                }
            ],
            "methods": [
                {
                    "name": ["sourceName", "dest1name", "dest2name"],
                    "desc": "desc",
                    "parameters": [
                        {
                            "name": ["sourceName", "dest1name", "dest2name"],
                            "lvIndex": 1
                        }
                    ],
                    "variables": [
                        {
                            "name": ["sourceName", "dest1name", "dest2name"],
                            "lvIndex": 1,
                            "lvStartOffset": 1,
                            "lvtIndex": 1
                        }
                    ]
                }
            ]
        }
    ]
}

@NebelNidas
Copy link
Member

Why is this needed though? Does any other application use this format? If not, shouldn't mapping-io also provide a reader then?

@NebelNidas
Copy link
Member

Parchment has an actually standardized format, so once ParchmentMC/Feather#9 is ready, I think this can be closed

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

Successfully merging this pull request may close these issues.

3 participants