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