JSON Parser¶
Class: JSONParserBlockV1
Source: inference.core.workflows.core_steps.formatters.json_parser.v1.JSONParserBlockV1
The block expects string input that would be produced by blocks exposing Large Language Models (LLMs) and Visual Language Models (VLMs). Input is parsed to JSON, and its keys are exposed as block outputs.
Accepted formats: - valid JSON strings - JSON documents wrapped with Markdown tags (very common for GPT responses)
{"my": "json"}
Details regarding block behavior:
-
error_status
is setTrue
whenever at least one ofexpected_fields
cannot be retrieved from input -
in case of multiple markdown blocks with raw JSON content - only first will be parsed and returned, while
error_status
will remainFalse
Type identifier¶
Use the following identifier in step "type"
field: roboflow_core/json_parser@v1
to add the block as
as step in your workflow.
Properties¶
Name | Type | Description | Refs |
---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
raw_json |
str |
The string with raw JSON to parse.. | ✅ |
expected_fields |
List[str] |
List of expected JSON fields. error_status field name is reserved and cannot be used.. |
❌ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow
runtime. See Bindings for more info.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to JSON Parser
in version v1
.
- inputs:
Florence-2 Model
,Google Gemini
,OpenAI
,Florence-2 Model
,Anthropic Claude
,OpenAI
,Llama 3.2 Vision
- outputs:
PTZ Tracking (ONVIF)
.md),Perception Encoder Embedding Model
,SIFT
,Cache Set
,Dimension Collapse
,Detections Stitch
,Color Visualization
,Perspective Correction
,Path Deviation
,Model Monitoring Inference Aggregator
,Image Slicer
,Model Comparison Visualization
,Clip Comparison
,Stitch Images
,Dynamic Crop
,Moondream2
,Webhook Sink
,Pixelate Visualization
,Llama 3.2 Vision
,Camera Calibration
,Line Counter
,Reference Path Visualization
,Time in Zone
,Image Blur
,Blur Visualization
,Ellipse Visualization
,Trace Visualization
,Corner Visualization
,Polygon Zone Visualization
,Single-Label Classification Model
,Delta Filter
,Email Notification
,Object Detection Model
,Dot Visualization
,Label Visualization
,Byte Tracker
,Cosine Similarity
,Detections Filter
,Stitch OCR Detections
,Image Preprocessing
,SIFT Comparison
,JSON Parser
,Mask Visualization
,Data Aggregator
,Florence-2 Model
,Dominant Color
,Roboflow Dataset Upload
,Byte Tracker
,First Non Empty Or Default
,Rate Limiter
,Instance Segmentation Model
,Background Color Visualization
,Line Counter
,Keypoint Visualization
,Property Definition
,Multi-Label Classification Model
,VLM as Detector
,YOLO-World Model
,OpenAI
,VLM as Detector
,Bounding Rectangle
,Keypoint Detection Model
,Roboflow Dataset Upload
,Gaze Detection
,Circle Visualization
,Roboflow Custom Metadata
,Depth Estimation
,Florence-2 Model
,Buffer
,Single-Label Classification Model
,Template Matching
,Dynamic Zone
,Grid Visualization
,Instance Segmentation Model
,CSV Formatter
,Detections Consensus
,Overlap Filter
,Object Detection Model
,Identify Outliers
,OpenAI
,Keypoint Detection Model
,Image Contours
,Continue If
,Byte Tracker
,SIFT Comparison
,Local File Sink
,Cache Get
,Expression
,CLIP Embedding Model
,OCR Model
,Velocity
,SmolVLM2
,Google Gemini
,Detections Classes Replacement
,Camera Focus
,OpenAI
,Triangle Visualization
,Stability AI Inpainting
,Classification Label Visualization
,Detections Transformation
,Barcode Detection
,Bounding Box Visualization
,Distance Measurement
,Detections Merge
,Detections Stabilizer
,CogVLM
,Halo Visualization
,Image Convert Grayscale
,LMM
,Polygon Visualization
,Absolute Static Crop
,Slack Notification
,Stability AI Outpainting
,Crop Visualization
,Google Vision OCR
,Stability AI Image Generation
,Detection Offset
,Pixel Color Count
,Image Threshold
,Identify Changes
,VLM as Classifier
,Time in Zone
,Twilio SMS Notification
,Segment Anything 2 Model
,Clip Comparison
,QR Code Detection
,Line Counter Visualization
,Path Deviation
,VLM as Classifier
,Anthropic Claude
,LMM For Classification
,Multi-Label Classification Model
,Image Slicer
,Qwen2.5-VL
,Size Measurement
,Relative Static Crop
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
JSON Parser
in version v1
has.
Bindings
-
input
raw_json
(language_model_output
): The string with raw JSON to parse..
-
output
Example JSON definition of step JSON Parser
in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/json_parser@v1",
"raw_json": [
"$steps.lmm.output"
],
"expected_fields": [
"field_a",
"field_b"
]
}