你在这里: 网状物 > JSONFragmenter公司

JSONFragmenter公司

将JSON(JavaScript对象表示法)格式文本的部分提取到新的FME特性中。

输出端口

参数

展平参数

JSON查询

A JSON query is a simple mechanism to refer to values within a JSON document. A query is made up of one or more expressions, which are separated by a + operator. There are three types of expressions: JSON structure expressions, JSON property expressions and string literal expressions.

JSON Structure Expressions

JSON结构表达式可以引用JSON文档中的值。最外层的JSON元素(必须是数组或对象)总是由术语JSON引用,并且该术语必须出现在每个JSON结构表达式的开头。子元素可以使用类似JavaScript的方括号索引操作符来引用。例如,如果最外层的元素是数组,那么数组的第一个元素可以由表达式json[0]引用,第二个元素可以由表达式json[1]引用,依此类推。同样,如果最外层的JSON元素是一个对象,带有键“name”和“address”,那么这些键的值可以分别由表达式JSON[“name”]和JSON[“address”]引用。

这些索引运算符可以级联。例如,如果最外层的JSON元素是一个具有键和“address”的对象,其值是一个包含键“city”和“province”的对象,那么这些值可以通过表达式JSON[“address”][“city”]和JSON[“address”][“province”]来引用。

为了引用数组或对象中的所有值,可以使用通配符索引*。例如,如果最外层的JSON元素是数组,那么表达式JSON[*]引用数组中的每个元素。

JSON属性表达式

A property expression is a structure expression as described above, followed by a . (dot) operator and a property name. Currently, the only supported properties are type and size. The type property returns the type of the JSON value referred to by the JSON structure expression. For example, if the outermost JSON element is an array, and the first element of the array is a string, then the expression json[0].type would have a value of string. The size property, which can only be applied to an array, returns the number of elements in the array.

字符串文字表达式

字符串文字表达式只是一个带引号的字符串值,例如“this is A string literal expression”。

FME许可级别

FME专业版及以上

编辑变压器参数

Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, clickbeside the applicable parameter. For more information, see变压器参数菜单选项.

Transformer Categories

特定格式

网状物

Search FME Knowledge Center

Search for samples and information about this transformer on theFME知识中心.

标签关键词:JSONExploder