Assignment IV: JSON Schema Analyzer

This assignment involves building a tool that analyzes a JSON document and infers its schema.


Objective

Write a program that takes a JSON file as an argument and performs the following:

  1. Reads the JSON document from the provided file.
  2. Analyzes the document structure to identify the schema (attribute names).
  3. For each attribute in the schema, infers its data type based on the values present in the document.

Possible Data Types


Output

The program should display the inferred schema in a user-friendly format.
Here’s an example:

Schema:


Implementation

You must implement this tool in C/C++. Here are some key points to consider:


Evaluation

Your program will be evaluated based on the following criteria:


Tips


Compilation Instructions

For macOS/Linux

To compile:

g++ quickstart.cpp simdjson.cpp 

in Windows

Add all files to the project