Talk:Toolserver:Unified Wiktionary API

From mediawiki.org

This page was moved from the Toolserver wiki.
Toolserver has been replaced by Toolforge. As such, the instructions here may no longer work, but may still be of historical interest.
Please help by updating examples, links, template links, etc. If a page is still relevant, move it to a normal title and leave a redirect.

Can I propose this as the format? It gets away from having to number property names (e.g. "etym1"), and from having strings that contain = ("g=m"). It also removes three letter abbreviations, as these may be confused with language codes. Every property with the value of a list ends in "s", and none of the others do.

{
    "wikt": "eng",
    "word": "helium",
    "alts": ["Helium", "hélium"],
    "langs": [
        {
            "lang": "eng",
            "etyms": [
                "Modern Latin, from {{etyl|grc}} '''{{polytonic|[[ἥλιος]]}}''' ‘sun’ (because its presence was first theorised in the sun's atmosphere)."
            ],
            "prons": [
                "{{enPR|hē'lēəm}}, {{IPA|/ˈhiːlɪəm/}}, {{SAMPA|/\"hi:li@m/}}"
            ],
            "hyph": "he·li·um",
            "poses": [
                {
                    "part": "noun",
                    "etym": 1,
                    "pron": 1,
                    "imgs": ["image|Electron shell 002 Helium.svg|200px|1|Schematische Darstellung der Elektronenhülle von ''Helium''"],
                    "infl": "helium (uncountable)",
                    "defs": [
                        {
                            "text": "A [[colorless]] and [[inert]] gas, and the second lightest chemical [[element]] (''symbol'' He) with an [[atomic number]] of 2 and [[atomic weight]] of 4.002602.",
                            "ders": ["heliair", "heliox"],
                            "rels": ["[[helio-]]<!--of the sun, not of helium-->", "[[Helios]]<!--the Greek sun god that helium is named after-->"],
                            "trad": [
                                {"lang": "afr", "word": "helium"},
                                {"lang": "deu", "word": "Helium", "g": "n"},
                                "...",
                                {"lang": "rus", "word": "гелий", "g": "m", "repr": "gélij", "sc":"Cyrl"}
                            ],
                            "syns": [
                                "H<sub>2</sub>", "//For example",
                                {"word": "E939", "rem": "when used as a [[packaging gas]]"}, "//When further context can be gathered"
                            ]
                        }
                    ],
                    "exts": [
                        "{{wikipedia}}",
                        "For etymology and more information refer to: http://elements.vanderkrogt.net/elem/he.html (A lot of the translations were taken from that site with permission from the author)"
                    ],
                    "cats": [
                        "Chemical elements"
                    ]
                }
            ]
        },
        {
            "lang": "fin",
            "poses": [
                {
                    "part": "noun",
                    "defs": {
                        "text": "{{element|lang=fi}} [[#English|helium]]"
                    }
                }
            ],
            "exts": [ "{{wikipedia|lang=fr}}" ]
        }
    ],
    "iwikis": [
        "ast",
        "cs",
        "de",
        "el",
        "fa",
        "fr",
        "io",
        "kk",
        "la",
        "lt",
        "nl",
        "no",
        "pl",
        "pt",
        "ro",
        "ru",
        "simple",
        "fi",
        "sv",
        "ta",
        "vi",
        "tr",
        "zh" 
    ] 
}