JSON taggers

David Megginson edited this page Oct 29, 2016 · 4 revisions

(For coders)

A JSON tagger is a JSON specification for adding HXL hashtags to an untagged dataset.

Currently, you can use a JSON tagger for the tagger property of a JSON data source. Soon, you will also be able to provide it directly to the HXL Proxy via a &tagger HTTP parameter.

Properties

The JSON tagger is an object (dictionary) with the following properties:

Property Required Description Example
specs yes A JSON object (dictionary) with header text as keys and HXL tagspecs as values ("#" is optional in the tagspecs). The keys match substrings unless the match_all property is specified, and always ignore character case, whitespace, and punctuation. {"Cluster": "#sector", "Province", "#adm1+name"}
default_tag no A HXL tagspec to apply to any columns that don't match one of the specs. affected+label
match_all no If the value is truthy, the keys in the specs property must match the entire header text rather than just a substring. 1

Example

{
    "default_tag": "affected+label",
    "match_all": 1,
    "specs": {
        "country": "#country+name",
        "country code": "#country+code"
    }
}
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.