translate.storage.jsonl10n

Package translate :: Package storage :: Module jsonl10n |
[hide private]
[frames] | no frames]

# Module jsonl10n

source code

    Class that manages JSON data files for translation

    JSON is an acronym for JavaScript Object Notation, it is an open standard
    designed for human-readable data interchange.

    JSON basic types
    ================
      - Number (integer or real)
      - String (double-quoted Unicode with backslash escaping)
      - Boolean (true or false)
      - Array (an ordered sequence of values, comma-separated and enclosed
        in square brackets)
      - Object (a collection of key:value pairs, comma-separated and
        enclosed in curly braces)
      - null

    Example
    =======

      {
           "firstName": "John",
           "lastName": "Smith",
           "age": 25,
           "address": {
               "streetAddress": "21 2nd Street",
               "city": "New York",
               "state": "NY",
               "postalCode": "10021"
           },
           "phoneNumber": [
               {
                 "type": "home",
                 "number": "212 555-1234"
               },
               {
                 "type": "fax",
                 "number": "646 555-4567"
               }
           ]
       }

    TODO
    ====
      - Handle \u and other escapes in Unicode
      - Manage data type storage and conversion. True -> "True" -> True
      - Sort the extracted data to the order of the JSON file

Classes | [hide private]
| JsonUnit A JSON entry
| JsonFile A JSON file

Variables | [hide private]
| __package__ = ``'``translate.storage``'``

Imports: os, StringIO, json, base