Dateitypen für JSON konfigurieren

Sie können die Einstellungen für JSON konfigurieren, um die Verarbeitung dieses Dateityps während der Übersetzung oder Überprüfung anzupassen.

Prozedur

  1. Decide for which projects you want to configure file type settings:
    • For the active project, go to the Projects view, and on the Home tab, select Project Settings.
    • For all future projects, go to File > Options.
  2. Erweitern Sie die Liste Dateitypen und wählen Sie den Filter JSON aus.
  3. Select the Parser page, and then:
    1. Under String value extraction, choose one of the options:
      • Extract all string, to extract all string values that contain a key.
      • Specify rules for extracting, to extract values (numbers, boolean, strings, date time) from specific file paths. If the source file has no value, then that empty value becomes undefined in the target file.
    2. If you choose Specify rules for extracting (under String value extraction), select Add. In the Add JSON Path dialog, type a path, choose a value from the Document Structure Information list, and then select OK.
  4. Select the Writer page, and then:
    1. Under Writer:
      • Select Escape non-ASCII and control characters, so that all symbols are transformed to strings, including the Chinese or Arabic characters. For example, if the option is enabled, certain symbols will look like "\u63d0" (hexdecimal digits). If the option is disabled, the hexadecimal digits will be shown as Unicode characters and will be displayed as such in the target file.
      • Select Enable pretty printing in the target file, so that you avoid having all the content written inline. This option is enabled by default.
    2. Under Unicode UTF-8 byte order mark (BOM), choose when the SDL file support software should insert a UTF-8 BOM in the target file:
      • Preserve: don't add if not originally present
      • Preserve: add if not originally present
      • Remove if present
  5. Wählen Sie die Seite Eingebettete Inhalte aus.
  6. Wählen Sie In der Dokumentstruktur enthaltene eingebettete Inhalte verarbeiten aus, um eingebettete XML-Inhalte zu verarbeiten.
  7. Wählen Sie Hinzufügen aus und wählen Sie dann unter Verarbeitung eingebetteter Inhalte hinzufügen in der Liste Eingebettete Inhalte eine Verarbeitung für die eingebetteten Inhalte aus.
  8. Select the QuickInsert page.
  9. Specify QuickInsert settings to insert tags and formatting, or to insert text and special characters.
  10. Wählen Sie OK aus.