Navigation

Ventuz Introduction

  • Introduction
  • Getting Started
  • Ventuz Editions
  • Ventuz Products
  • Realtime Rendering
  • Frequently Asked Questions
  • Common Mistakes
  • Deploying a Ventuz Presentation
  • Scene Performance and Tweaks

Quick Guides

  • Quick Guide Index
  • Business Logic
  • 3D Art
  • 2D Art
  • Programming
  • System Engineer

General

  • Index
  • What's New
  • Ventuz System Requirements
  • Communication Protocol Overview
  • Configuration Editor
  • Audio / Video Configuration
  • Machine Configuration
  • Web Configuration Editor and License Manager
  • GPI Configuration for Runtime or Director
  • Supported Formats
  • Supported Hardware
  • Multisampling / Anti-Aliasing
  • Input Subsystem
  • Ventuz Proprietary Files
  • Migrating Content to Ventuz 6
  • Migrating Content to Ventuz 5
  • Summary Shortcuts
  • Terminology
  • Manual Index

Ventuz Designer

  • Designer Indices
Introduction
  • Designer Introduction Index
  • Designer Overview
  • Realtime Rendering
  • Project Browser
  • Designer Interface
  • Designer Options
  • Working with Nodes
  • Hierarchy and Content Editors
  • 2D Workflow
  • 3D Workflow
  • Animation Workflow
  • Best Practices
  • Reading Data in Ventuz
  • Display Images and Movies
  • Scene Performance and Tweaks
  • Deploying a Ventuz Presentation
  • Render to Disk
User Interface
  • Designer User Interface Index
  • Designer Interface
  • Renderer Window
  • Layer Editor
  • Property Editor
  • Property Groups
  • Hierarchy Editor
  • Content Editor
  • Find and Replace
  • Toolbox
  • Animation Editor
  • Shader Editor
  • Text Editor
  • Message View
  • Scene Tree
  • Stage Editor
  • Container Outline
  • Watches Editor
  • Performance Statistics
2D Workflow
  • 2D Workflow Index
  • 2D Workflow
  • Layer Editor
  • Common Layer Properties
  • IPP Effects
  • Color Correction FX
  • Distortion FX
  • Filter FX
  • Hierarchy and Content Editors
  • Display Images and Movies
3D Workflow
  • 3D Workflow Index
  • 3D Workflow
  • Hierarchy and Content Editors
  • Renderer Window
  • Camera Navigation
  • Manipulate Objects with Gizmos
  • Layer Editor
  • Property Editor
  • Hierarchy Editor
  • Working with Nodes
  • Isolated Objects
  • Containers
  • Text Rendering
  • Character Sets
  • Geometry Import
  • Display Images and Movies
  • Particle System
  • Creating Realistic Reflections
  • Unreal Integration
  • Notch Integration
  • E2E Node Overview
Logic Workflow
  • Logic Workflow Index
  • Hierarchy and Content Editors
  • Content Editor
  • Hierarchy Editor
  • Working with Nodes
  • Property Editor
  • Containers
  • Project and Scene Data
  • Reading Data in Ventuz
  • Display Images and Movies
  • Input Subsystem
  • Multitouch
  • TUIO Protocol
  • Open Sound Control
  • Unreal Integration
  • Notch Integration
  • E2E Node Overview
Animation Workflow
  • Animation Workflow Index
  • Animation Workflow
  • Animation Editor
  • Content Editor
  • Hierarchy Editor
  • Property Editor
  • Animation and State Engine
  • Templates
  • Template Engine
  • Unreal Integration
  • Notch Integration
Project Structure
  • Project Structure Index
  • Annotations
  • Projects and Scenes
  • Project Properties
  • Project Maintenance
  • Project and Scene Data
  • Scene Management
  • Scene Statistics
  • Scene Tree
  • Performance Statistics
How Tos
  • Designer How to Index
  • How to Run Ventuz
  • How to Work with Designer
  • Ventuz Designer Drag&Drop Workflow
  • How to work with Shadows
  • How to Build Content for Multiple Screens
  • How to Use Emoijs
  • How to Build a Template
  • How to Use the Color Difference Keyer
  • How To Use the HDR Engine
  • How Create Lens Flares and Bloom
  • How to Create Visuals Loader Node
  • How to Remote Control with a Phone
  • How to use Head Mounted Displays
  • How to work with 3D Reference Layers
  • How to create a Firework Particle System
  • How to use DDS with new Block Compression modes
  • How to use the Substance Integration
  • How To Integrate Unreal
  • How To Integrate Notch
  • How To use the Vertex Integration
  • How To Control and Customize Ventuz
Reference
  • Available Nodes
  • Animation Nodes
  • Material&Color Nodes
  • Data Nodes
  • E2E Nodes
  • Geometry Nodes
  • Interaction Nodes
  • IO Nodes
  • Layers
  • Light Nodes
  • Logic Nodes
  • Render Option Nodes
  • Slides Nodes
  • Sound Nodes
  • Text Nodes
  • Texture Nodes
  • VR Nodes
  • World Nodes
  • Summary Shortcuts
  • Layer Editor Shortcuts
  • Hierarchy Editor Shortcuts
  • Content Editor Shortcuts
  • Animation Editor Shortcuts
  • Director Shortcuts

Ventuz Director

  • Index
  • Introduction
  • Environment
  • Show
  • User Interface
  • Assets
  • Taking Action
  • Property Editor
  • Shot Box
  • Project Data
  • Pages
  • Playlist
  • Timeline
  • Content References
  • Topology
  • Channels
  • Macros
  • Designing Templates
  • Plug-Ins
  • Shortcuts
  • Command Line Options
  • Application Settings
  • Glossary
  • GPI Configuration

Ventuz Runtime & Configuration

  • Runtime Index
  • Configuration Configuration Editor
  • Machine Configuration
  • Video/Audio Configuration
  • Web Configuration Editor and License Manager
  • Render Setup Editor
  • Warping and Soft-Edging Editor
  • Machine Clustering
  • Supported Hardware
  • Director Mode
  • Runtime How Tos Index
  • How to Configure Audio
  • How to Use Live Options
  • How To Play Out On Multiple Screens
  • How To Render on a Machine Cluster
  • How to Use Head Mounted Displays
  • How to Setup Spout with Ventuz
  • How to Use Newtek NDI
  • How to Use a Mixed Frame Rate Cluster
  • How to Use Tracking

How To

Designer
  • Designer How to Index
  • How to Run Ventuz
  • How to Work with Designer
  • Ventuz Designer Drag&Drop Workflow
  • How to work with Shadows
  • How to Build Content for Multiple Screens
  • How to Use Emoijs
  • How to Build a Template
  • How to Use the Color Difference Keyer
  • How To Use the HDR Engine
  • How Create Lens Flares and Bloom
  • How to Create Visuals Loader Node
  • How to Remote Control with a Phone
  • How to use Head Mounted Displays
  • How to work with 3D Reference Layers
  • How to create a Firework Particle System
  • How to use DDS with new Block Compression modes
  • How to use the Substance Integration
  • How To Integrate Unreal
  • How To Integrate Notch
  • How To build and playback Ventuz Content in Vertex
Runtime & Configuration
  • Runtime How Tos Index
  • How to Configure Audio
  • How to Use Live Options
  • How To Play Out On Multiple Screens
  • How To Render on a Machine Cluster
  • How to use Head Mounted Displays
  • How to setup Spout with Ventuz
  • How to use Newtek NDI
  • How to use a Mixed Frame Rate Cluster
  • How to use Tracking
  • How To Integrate Unreal
  • How To Integrate Notch
  • How To build and playback Ventuz Content in Vertex
Director
  • How To Control Multiple Graphics Independently From Each Other
  • How to use the Companion with Director

Ventuz Node Reference

ANIMATION
  • Mover
  • Alternator
  • Simple Control
  • Timeline Control
  • Anmation Rig
  • Keyframe Animation
  • Animation Group
COLOR/MATERIAL
  • Alpha
  • Fog
  • Ground Fog
  • Sky Box
  • Color to RGBA
  • HSLA to Color
  • RGBA to Color
  • Color Transformer
  • HLSL Shader
  • Color
  • Material
  • Color Picker
  • Substance Material
DATA
  • Database
  • Excel
  • JSON
  • RSS Feed
  • Resource Linker
  • Text File
  • XML
E2E
  • E2E Axis
  • E2E Data
  • E2E Control
  • E2E Layer
  • E2E Provider
  • E2E Node Overview
GEOMETRY
  • Rectangle
  • Rounded Rectangle
  • Gradient Rectangle
  • Overlay Rectangle
  • Cube
  • Circle
  • Sphere
  • Cylinder
  • Cone
  • Torus
  • Chart
  • Random Points
  • Mesh Loader
  • Geometry Import (Live)
  • Volume
  • Get Bounding Box
  • Arrow
  • Particle System
  • Path Renderer
  • Geometry Renderer
INTERACTION
  • Interaction Rect
  • Touch Button
  • Touch Excluder
  • Touch Marker
  • Touch Paint
  • Touch Pattern
  • Touch Proxy
  • Touch Ripples
  • Touch Transformations
  • Web Browser
  • Touch Teleport
  • Touch Simulator
INPUT/OUTPUT (I/O)
  • GPI
  • Joystick
  • Keyboard
  • MIDI
  • Mouse
  • Network
  • Open Sound Control
  • Serial
  • Timecode
  • DMX
  • HTTP
  • RamDiskWriter
LAYER
  • 3D Layers
  • 3D Layer Reference
  • 2D Layers
  • PSD Import Layer
  • E2E Layer
  • Others
LIGHT
  • Light Sources
LOGIC
  • Array Processing
  • Convert To Text
  • Cluster Synchronization
  • Counter
  • Date Time
  • Directory
  • Dispatcher
  • Enumeration
  • Expressions
  • Invert
  • Log
  • Loop Breaker
  • Math Effects
  • Matrix Operations
  • Scene Event
  • Script
  • String Operations
  • System ID
  • Text Splitter
  • Timer
  • Toggle
  • URL
  • Value Switch
  • Value Buffer
  • Variables
  • Visual Indexer
RENDER OPTIONS
  • Alpha Blending
  • Color Write
  • Alpha Testing
  • Clip Plane
  • Filter
  • Mask
  • Mirror
  • Effect
  • Render Cube Map
  • Draw Modes
  • Stencil
  • ZTesting
SOUND
  • Audio Clip
  • Sound
  • Volume Control
  • Audio Analysis
SLIDES
  • Slide Manager
  • Slide
  • Slide Port
  • Pivot
TEXT
  • Text Effects
  • Text Layouts
  • Text Rendering
TEXTURE
  • Background
  • Hatch
  • Image
  • Texture
  • SVG Loader
  • Gradient Texture
  • Live Video
  • Movie Stream
  • Movie Frame
  • Movie Clip
  • Texture Loader
  • Snapshot
  • Snapshot Framebuffer
  • Texture Saver
  • Video Source Selector
  • VIO Input
  • Spout Receiver
  • NDI Receiver
  • Substance Loader
  • QR Code
VR/AR
  • Tracked Devices
  • Draw Tracked Devices
WORLD
  • Axis
  • Billboard
  • GetWorld
  • SetWorld
  • Arrange
  • Ticker
  • Layout
  • Group
  • World Z Sort
  • YesNo
  • Switch
  • Spread
  • Filter Pass
  • Set Pass
  • Hierarchy Container
  • Scene Port
  • Content Container
  • Template Port
  • Container Info
  • Camera
  • Paths

Advanced and Development

  • Advanced and Development Index
  • Command Line Options
  • Ventuz IP Ports
  • Ventuz Machine Service
  • TUIO
  • .NET Scripting
  • HLSL Shader Programming
  • Ventuz API and SDK
  • Ventuz Extension API
  • Ventuz VIO API
  • Ventuz File Format (VFF)
  • Ventuz Stream Out API
  • Lens Calibration File for FreeD
  • E2E Node Overview
  • Unreal Integration
  • Notch Integration
Remoting
  • Remoting Index
  • Remoting Overview
  • How To Control and Customize Ventuz
  • Remoting 4
  • Remoting 4 via Websockets
  • Remoting 4 via HTTP
  • Director Remoting
  • Deprecated Remoting
  • Remoting Machine Signature

Misc

  • Presets
« Previous:
» Index «
Next: »

JSON

JSON This node takes a JSON string and provides its content for further processing.

​JSON (JavaScript Object Notation) is an open standard format that uses human-readable text to transmit data objects consisting of key:value pairs. It is used primarily to transmit data between a server and web application, as an alternative to XML. Many online services such as ​Twitter, ​Facebook, ​Yahoo or ​Google are using JSON as a simple data format for their information services.

The JSON Parser node can parse JSON objects, arrays of objects, single values or arrays of values. In contrast to XML, which only knows the string type, JSON can handle a few strongly typed values. Unfortunately JSON doesn't define any data size or precision of these types, so many incompatibilities can be expected when using JSON as data interchange format.

Examples

  1. Single value:
    "A simple string\nwith linefeeds and escaped \u0055nicode"
  2. Array of values
    [ 1, 2, 3, 4 ]
  3. Single object (with nested object values and array)
    {
        "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"
            }
        ]
    }
  4. Array of objects
    [
    {
        "firstName": "John",
        "lastName": "Smith",
        "age": 25,
    },
    {
        "firstName": "Donald",
        "lastName": "Duck",
        "age": 5,
    },
    {
        "firstName": "John",
        "lastName": "Doe",
        "age": 178,
    }
    ]

JSON Types

JSON natively supports the following data types:

  • string: "quoted text with\nC-style\tcharacter escaping"
  • boolean: true or false
  • numbers: (integers and or floating point numbers) 0, 561423, -104.199, 0.123e-6
  • null-value: null
  • objects: (see below)
  • arrays: elements can be a mixture of values, objects or arrays

JSON Objects

A JSON object is expressed in a list of named values, where each name is a quoted string followed by a colon :. The value is a choice of the supported types. A JSON object can be understood as a dictionary or a list key:value pairs. JSON is a very lazy format . Therefore some issues have to be in mind when using JSON:

  • JSON doesn't define that the name within an object must be unique. The value "user" could appear two times, for example.
  • the type of a named value may differ. A value named "city" could appear as a string in one JSON object and as a number in another one.
  • there are no naming rules, so some JSON objects may provide weird names, containing whitespaces, line feed or non-printable characters.
  • the actual text format is not defined. Usually text is transferred as UTF-8 or Unicode. If the transport is not clear, the 7-bit ASCII format with escaped Unicode should be the preferred choice.

Usually providers for JSON formatted data try to avoid the issues described above. If a JSON text with such issues has to be parsed by the Ventuz JSON Parser node you might face problems gathering the correct information from that object!

JSON Parser Node

The Ventuz JSON Parser node provides three properties. Access to the parsed data is provided by properties that are created by editing the custom model of the JSON Parser node.

  • Inputs:
    • Json (JsonObject): Receives the JsonObject (or text) to be parsed.
    • Index (integer): The current index of the parsed object that has to be transferred to the output properties.
  • Outputs:
    • Count (integer): the number of elements in the parsed JSON object.
    • ... (all types): Custom Model output properties

The type JsonObject is an internal Ventuz type. This type can be converted from and to string via binding. Any node that provides a string can be bound to the Json input. Any Json output can be bound to any node that accepts JsonObjects or strings.

These different types of JSON text can be parsed:

  1. A single unnamed JSON value.
  2. A single unnamed array of JSON values.
  3. A single unnamed JSON object.
  4. A single array of JSON objects.

The context menu of the JSON Parser node and the Property Editor show an Update verb, which automatically creates the desired custom model output properties based on the current JSON text assigned to the Json property. The common design workflow is to assign an example JSON text to the node and select Update and let Ventuz create the correct properties for you. If you prefer to create your own custom model you can use the Custom Model Editor.

The properties defined in the custom model are either the Value property (case 1 and 2) or the names of the first JSON object in cases 3 and 4. In cases 1 and 3 the Count property will provide a 1 value, because there's only one element in the parsed object. In cases 2 and 4, Count provides the number of elements available in the arrays.

If the parser was unable to parse the text, the Count property will be 0 and the icon of the Parser node turns red. All output properties will output the default value of their type (false, null, zero)

The automatic update of the custom model can also recognize arrays of values. Some rules apply:

  • If all elements of the array are of the same simple type (booleans, numbers or strings), a Ventuz array of its corresponding type is created.
  • null is interpreted as type string
  • If all numbers are without a decimal point (.) they are treated as integer
  • If an array of numbers is mixed (integers and floating point numbers) it is treated as float (single)

Ventuz only handles 32-bit IEEE float numbers (single precision) and 32-bit integer numbers. Some JSON objects may provide large integers or number with a higher precision (64-bit or 128-bit). These numbers won't be parsed correctly! Try to parse them as string instead.

Chains of Parser nodes

Multiple JSON Parser nodes can be chained to parse nested JSON objects. If the first parser provides an output property of type JsonObject (or string) a secondary parser node can receive that object and output its values.

Creating JSON text

If a conversion back to text is required, you can either simply bind the JsonObject output to a string input property or use the Convert To Text node. The Convert To Text allows you to specify a format for the JsonObject (like number formats #.###) which controls the conversion.

The string conversion of a JsonObject supports two formats:

  • a ASCII: all non-ASCII characters are escaped as unicode (ä = \u00E4)
  • c COMPACT: all whitespaces and linefeeds are stripped.

The format can be specified in the convert to text node:

{0}               normal formatted JSON (default)
{0:a}             all ASCII compatible
{0:c}             compact - one line
{0:ac} or {0:ca}  ascii-compact

The Value0 binding must be of type JsonObject. This type is provided either the Json input property or any Json-object output property of the Json Parser node.

If a complete JSON object has to be constructed, please see JSON section in the Convert To Text page.

See also:
  • ​JavaScript Object Notation
  • ​JSON Syntax
  • Convert to Text node

« Previous:
» Index «
Next: »
Copyright 2022 Ventuz Technology