---
title: "Discussion on \"JSON Schema Validator\" | Hashnode"
description: "Discussion on \"JSON Schema Validator\". We use json for API responses, and the task is to validate the response schema with previous release to find regression if any. \nSo there was a bug in the system where a json was responding as below \n{\ndata: [\n20,30,0,0,0,0,0]\n}\ninstead of \n{\ndata: [..."
url: "https://hashnode.com/posts/json-schema-validator/615867bb70a8165c11f63d0f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [JSON Schema Validator](https://cloudqa.hashnode.dev/json-schema-validator?utm_source=hashnode&utm_medium=feed)

We use json for API responses, and the task is to validate the response schema with previous release to find regression if any. So there was a bug in the system where a json was responding as below { data: \[ 20,30,0,0,0,0,0\] } instead of { data: \[...

Oct 2, 2021 · 2 min read · cloudqa.hashnode.dev  
Read the article

-   [#json](https://hashnode.com/tag/json)

## Written by

[Siddartha](https://hashnode.com/@cloudqa)

@cloudqa

  
[View profile](https://hashnode.com/@cloudqa)

Learn.. perform.. learn.. perform..

## Responses 1

Markdown supported · ⌘↵ to post

[Siddartha](https://hashnode.com/@cloudqa)

[Oct 2, 2021](https://hashnode.com/posts/json-schema-validator/615867bb70a8165c11f63d0f/comment/6158989e70a8165c11f64113)

Why to use global keywork in definition? As assignment considers variable as local to scope, we need to use global keywork to specify explicitly to use the external variable.

[docs.python.org/3/faq/programming.html](https://docs.python.org/3/faq/programming.html#why-am-i-getting-an-unboundlocalerror-when-the-variable-has-a-value)
