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:
OpenAI
,Google Gemini
,OpenAI
,Llama 3.2 Vision
,Florence-2 Model
,Florence-2 Model
,Anthropic Claude
- outputs:
VLM as Detector
,SIFT Comparison
,Stitch OCR Detections
,Instance Segmentation Model
,Stitch Images
,Dimension Collapse
,LMM
,Circle Visualization
,Slack Notification
,Camera Calibration
,Florence-2 Model
,Distance Measurement
,Byte Tracker
,Roboflow Dataset Upload
,VLM as Classifier
,JSON Parser
,OpenAI
,Path Deviation
,Bounding Box Visualization
,Instance Segmentation Model
,Single-Label Classification Model
,VLM as Classifier
,Clip Comparison
,Blur Visualization
,Model Monitoring Inference Aggregator
,Path Deviation
,Segment Anything 2 Model
,Size Measurement
,Single-Label Classification Model
,Dynamic Zone
,Ellipse Visualization
,Crop Visualization
,Keypoint Visualization
,Cache Set
,Trace Visualization
,Byte Tracker
,Barcode Detection
,Rate Limiter
,CSV Formatter
,Time in Zone
,OpenAI
,Triangle Visualization
,Keypoint Detection Model
,OCR Model
,SIFT Comparison
,Overlap Filter
,Time in Zone
,First Non Empty Or Default
,Image Contours
,Polygon Zone Visualization
,Detections Merge
,Roboflow Custom Metadata
,Dominant Color
,LMM For Classification
,Google Gemini
,Object Detection Model
,Buffer
,Detections Stitch
,Background Color Visualization
,Stability AI Inpainting
,Continue If
,VLM as Detector
,Anthropic Claude
,Image Preprocessing
,YOLO-World Model
,Delta Filter
,Keypoint Detection Model
,Color Visualization
,Multi-Label Classification Model
,Identify Outliers
,Expression
,Identify Changes
,Image Slicer
,OpenAI
,Detections Transformation
,SIFT
,Detections Stabilizer
,Reference Path Visualization
,Multi-Label Classification Model
,Local File Sink
,Cache Get
,Velocity
,Polygon Visualization
,QR Code Detection
,Stability AI Image Generation
,Grid Visualization
,Cosine Similarity
,Email Notification
,Roboflow Dataset Upload
,Byte Tracker
,Model Comparison Visualization
,Clip Comparison
,Data Aggregator
,Moondream2
,Florence-2 Model
,Gaze Detection
,Relative Static Crop
,Absolute Static Crop
,Dynamic Crop
,Bounding Rectangle
,Image Blur
,Llama 3.2 Vision
,Object Detection Model
,Line Counter
,SmolVLM2
,CLIP Embedding Model
,Detections Classes Replacement
,Pixelate Visualization
,Webhook Sink
,Image Threshold
,Line Counter Visualization
,Label Visualization
,Dot Visualization
,Corner Visualization
,Twilio SMS Notification
,Detections Filter
,Perspective Correction
,Image Convert Grayscale
,Detection Offset
,Mask Visualization
,Classification Label Visualization
,Image Slicer
,Line Counter
,CogVLM
,Detections Consensus
,Template Matching
,Camera Focus
,Google Vision OCR
,Halo Visualization
,Qwen2.5-VL
,Property Definition
,Depth Estimation
,Pixel Color Count
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"
]
}