The PList parser accepts mutiple files or directories (which it'll recursively search). Each file will be loaded into the context, but the parser will also generate metadata about the structure of the file.
Note: The JSON, YAML and Plist parsers provide the same context structure, so you can easily switch input formats while keeping the same template.
The output context has the following structure:
files
:Array
— List of filesname
:String
— Name of the file (without extension)path
:String
— the path to the file, relative to the folder being scanneddocuments
:Array
— List of documents. Plist files will only have 1 documentdata
:Any
— The contents of the documentmetadata
:Dictionary
— Describes the structure of the document
The metadata has the following properties:
type
:String
— The type of the object (Array, Bool, Data, Date, Dictionary, Double, Int, String, Optional and Any)properties
:Dictionary
— List of properties metadata (only if a dictionary, repeats this metadata structure)element
:Dictionary
— Element metadata (only if an array, repeats this metadata structure)items
:Array
— List of metadata objects for each array element (only if the element.type isAny
,Dictionary
orArray
)
files:
- documents:
- data:
UILaunchStoryboardName: "LaunchScreen"
UIMainStoryboardFile: "Start"
User Ambiguous Integer: true
User Boolean: false
User Date: 2018-05-05T03:39:26Z
User Float: 3.14e+0
User Integer: 5
metadata:
properties:
Fabric:
type: "Dictionary"
properties:
APIKey:
type: "String"
Kits:
type: "Array"
element:
type: "Dictionary"
items:
- type: "Dictionary"
properties:
KitInfo:
properties: {}
type: "Dictionary"
KitName:
type: "String"
UILaunchStoryboardName:
type: "String"
UIMainStoryboardFile:
type: "String"
User Ambiguous Integer:
type: "Bool"
User Boolean:
type: "Bool"
User Date:
type: "Date"
User Float:
type: "Double"
User Integer:
type: "Int"
type: "Dictionary"
name: "Info"
path: "Info.plist"
- documents:
- data:
- "Eggs"
- "Bread"
- "Milk"
metadata:
element:
type: "String"
type: "Array"
name: "shopping-list"
path: "shopping-list.plist"