Skip to content

triarius/json2struct.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

json2struct.nvim

A Neovim plugin to covert JSON to a Go struct.

Installation

First, install yudppp/json2struct. This requires a recent Go toolchain installed, which is a fair assumption if you want to be using this plugin.

    go install github.com/yudppp/json2struct/cmd/json2struct@latest

Running the plugin requires json2struct to be in the $PATH, which the above command will achieve if $GOPATH/bin is in the $PATH.

Lazy.nvim

{
	"triarius/json2struct.nvim",
	dependencies = { "nvim-lua/plenary.nvim"}
	config = true,
}

Usage

Select the JSON in Neovim. Enter the command JSON2Struct. The selection will be replaced by a Go struct type that is capable of unmarshalling

Demo

demo

About

Convert JSON to a Struct

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages