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