| Struct to JSON GeneratorThis Visual Studio Code extension converts Go structs to JSON format with realistic fake data, offering a powerful tool for testing and development. Features
Converts selected Go struct to JSON with fake dataGenerates multiple JSON objects based on the same structSupports nested structs and various Go types including slicesIntelligently generates fake data based on field names (e.g., email, name, ID)Copies the generated JSON to clipboardOffers pretty-printing of JSON outputCustomizable number of JSON objects to generate Requirements
Visual Studio Code 1.6.0 or higherGo must be installed on your system Installation
Open Visual Studio CodePress Ctrl+P(orCmd+Pon macOS) to open the Quick Open dialogType ext install your-publisher-name.struct-to-json-generatorand press Enter Usage
Open a Go file containing the struct you want to convertSelect the entire struct in your editorOpen the Command Palette (Ctrl+Shift+PorCmd+Shift+Pon macOS)Type "Generate JSON from Struct" and select the commandThe generated JSON will be copied to your clipboard and a notification will appear Supported TypesThe extension supports the following Go types: 
Basic types: string, int, int32, int64, bool, float64Time: time.TimeCustom types: decimal.DecimalSlices of supported typesNested structs Fake Data GenerationThe extension generates realistic fake data based on field names: 
Fields containing "id" generate UUIDsFields containing "name" generate full namesFields containing "email" generate email addressesFields containing "country" generate country namesFields containing "currency" generate currency codesFields containing "datetime" generate RFC3339 formatted datesFields containing "status" generate random statusesFields containing "password" generate secure passwords Other string fields generate sentences, and numeric fields generate random numbers within a reasonable range. Known IssuesPlease report any issues on the GitHub repository. Release Notes0.0.1Initial release of Struct to JSON Generator 
 Enjoy! |  |