This project is a tool for generating MongoDB schemas from JSON data. It reads a JSON file and creates a BSON document that represents the data in the JSON file. The BSON document can be used to create a MongoDB collection with the correct structure for the data.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You will need the following software installed on your machine:
- Go (https://golang.org/)
- MongoDB (https://www.mongodb.com/)
To install the project, follow these steps:
- Clone the repository:
git clone https://github.com/Ramazan-xcod3r/goMongoSchemaCreator.git
- Change into the project directory:
cd goMongoSchemaCreator
- Run the project:
go run main.go --test data.json
The --test
flag is optional and can be used to test the data insertion into the database. The data.json
file is the JSON file that the tool will read and create the BSON document from.
To use the tool, run the following command:
go run main.go [--test] [data.json]
The --test
flag is optional and can be used to test the data insertion into the database. The data.json
file is the JSON file that the tool will read and create the BSON document from.
-
Ramazan-xcod3r - Github
This project is licensed under the MIT License