File: json.rst

package info (click to toggle)
translate-toolkit 3.19.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,156 kB
  • sloc: python: 74,004; sh: 1,412; makefile: 185; xml: 48
file content (43 lines) | stat: -rw-r--r-- 1,161 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
JSON
====

.. versionadded:: 1.9.0

:wp:`JSON` is a common format for web data interchange.

Example:

.. code-block:: json

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

Following JSON dialects are supported

* Plain JSON files.
* i18next v3 & v4
* Web Extension i18n
* `go-i18n v1 & v2 <https://github.com/nicksnyder/go-i18n>`_
* `gotext <https://pkg.go.dev/golang.org/x/text/cmd/gotext>`_
* `ARB <https://github.com/google/app-resource-bundle/wiki/ApplicationResourceBundleSpecification>`_
* `FormatJS <https://formatjs.io/docs/getting-started/message-extraction/>`_
* `RESJSON <https://docs.rws.com/en-US/sdl-passolo-help-785448/add-in-for-javascript-object-notation-json-file-format-types-410873>`_ (JavaScript Resource File)