Use code completion for your custom JSON format in just 1 minute

JM Robles
3 min readNov 22, 2020

TL;DR: How you can to enable the code completion for your Visual Studio Code IDE

JSON Schema rules!

Motivation

The code completion is one of the most worth and important features of an IDE. Since the first version of Visual Basic or Visual C++, the presence of “IntelliSense” feature improved the productivity of thousands of programmers.

Normally, to create a custom code-completion bundle for your favorite programming or scripting language is a non trivial task.

But in the case of JSON formats, that task is not so hard.

The JSON Schema

As you probably knows the JavaScript Object Notation (JSON) is a structureless format.

You can define whatever properties, arrays, etc.

The JSON schema enters to add schema to specify a custom JSON format for a specific payload.

We’ll not go into the details, just say that a JSON schema is another JSON file where we describe the properties and types about our objects.

In the following example, we define the types and required element of a JSON object to specify a calendar data type.

--

--

JM Robles

AIOps @ Montevive.ai / Backend / Platform engineer #llm #rag #llamaindex #langchain #go #python #kubernetes #terraform #devops