JSON File Format

  • About

    The intermediary JSON files created by the Exporter module and Imported to a target Jamroom site are a 'json encoded' array of all items of the file type, their datastore key/value pairs plus additional information to allow a full import.

    There are two basic types of JSON file and they are handled differently by the Importer module. Members contain information on profile and user linked pairs whilst 'item' files (blogs, audio, video etc.) refer only to the import of said items.
  • Members JSON File Format

    * Keys [_profile_export_id] and [_user_export_id] are required and its value is a unique ID per item.
    * Keys [profile_name], [user_name] and [user_email] are required to create a profile/user pair
    * Keys [_profile_created], [_user_created], [_profile_updated], [_user_updated], set to UnixTime. If not set, current time is used.
    * Additional keys of either [profile_*] or [user_*] are added to the profile or user datastores.
    * Default fields like 'pending', 'active' etc. will be added automatically.
    * Optional [_profile_file_xxx][url] and [_user_file_xxx][url] keys => url of downloadable file (xxx = key of file, eg. file, image, bg_image, header_image, audio or video).
    * Optional [_profile_file_xxx][filename] and [_user_file_xxx][filename] keys => the name of the original file
    * Optional [_profile_file_xxx][extension] and [_user_file_xxx][extension] keys => the extension of the original file
  • Items JSON File Format

    * Keys [_export_id] is required and its value is a unique ID per item.
    * The key [_module] is essential and must be an active module.
    * Keys [_created] and [_updated] set to UnixTime. If not set, current time is used.
    * Keys [_owner_profile] and [_owner_user] set to profile/user unique IDs. If not set, _profile_id and/or _user_id set to 0.
    * Additional keys of [xxxx_*] are added to the item datastore.
    * Default fields like 'pending' etc. will be added automatically.
    * Optional [_xxxx_file_xxx][url] key => url of downloadable file (xxx = key of file, eg. file, image, bg_image, header_image, audio or video).
    * Optional [_xxxx_file_xxx][filename] key => the name of the original file
    * Optional [_xxxx_file_xxx][extension] key => the extension of the original file
    * Optional [_xxxx_file_file_only][url] key => url of downloadable file - This file is copied across with no DS entries being added
    * Values starting with _getDSvalue instruct this function to get a value from another DS -
    * [xxxx_yyyy] => _getDSvalue,'module','unique_id','key'
    * Search for the 'module' DS item with the specified 'unique_id' and set [xxxx_yyyy] to its 'key' value
    * Values starting with _selfDSvalue instruct this function to get a value from another DS, as above, but AFTER the item has been created
    * Optional keys starting with '_table' add rows to a specified table. Format is "[_table:'module':'table name'] => array of [column names] => value"
    * Table column value can optionally start with '_getDSvalue' as above
    * If key [_table_only] set, only keys starting with '_table' are actioned
    * Optional [_scan_key] array of keys to be scanned and any '_getDSvalue' entries to be replaced

Share This

Tags