All Projects → ChimeraCoder → Gojson

ChimeraCoder / Gojson

Licence: other
Automatically generate Go (golang) struct definitions from example JSON

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Gojson

Aria2p
Command-line tool and library to interact with an aria2c daemon process with JSON-RPC.
Stars: ✭ 201 (-91.76%)
Mutual labels:  cli
Storyblok
You found an issue with one of our products? - submit it here as an issue!
Stars: ✭ 206 (-91.55%)
Mutual labels:  cli
Stow
GNU Stow - mirror of savannah git repository occasionally with more bleeding-edge branches
Stars: ✭ 207 (-91.51%)
Mutual labels:  cli
Next Build Id
Easily set your `next build` BUILD_ID to the latest git commit hash
Stars: ✭ 203 (-91.68%)
Mutual labels:  cli
Starport
The easiest way to build a blockchain.
Stars: ✭ 204 (-91.64%)
Mutual labels:  cli
Aws Recon
Multi-threaded AWS inventory collection tool with a focus on security-relevant resources and metadata.
Stars: ✭ 203 (-91.68%)
Mutual labels:  cli
Fwd
🚂 The little forwarder that could
Stars: ✭ 203 (-91.68%)
Mutual labels:  cli
Particle Cli
Command Line Interface for Particle Cloud and devices
Stars: ✭ 208 (-91.47%)
Mutual labels:  cli
Chatette
A powerful dataset generator for Rasa NLU, inspired by Chatito
Stars: ✭ 205 (-91.59%)
Mutual labels:  cli
Oci Cli
Command Line Interface for Oracle Cloud Infrastructure
Stars: ✭ 207 (-91.51%)
Mutual labels:  cli
Sclack
The best CLI client for Slack, because everything is terrible!
Stars: ✭ 2,363 (-3.12%)
Mutual labels:  cli
Webpack Dashboard
A CLI dashboard for webpack dev server
Stars: ✭ 13,850 (+467.86%)
Mutual labels:  cli
Facebook Dl
📼 Very minimal Facebook downloader written in 28 lines of Python code (not including comments and blank spaces)
Stars: ✭ 207 (-91.51%)
Mutual labels:  cli
Gopherlabs
Go - Beginners | Intermediate | Advanced
Stars: ✭ 205 (-91.59%)
Mutual labels:  cli
Stonky
A command line dashboard for monitoring stocks
Stars: ✭ 208 (-91.47%)
Mutual labels:  cli
Saldl
A lightweight well-featured CLI downloader optimized for speed and early preview.
Stars: ✭ 203 (-91.68%)
Mutual labels:  cli
Rts
RTS: request to struct. Generates Go structs from JSON server responses.
Stars: ✭ 206 (-91.55%)
Mutual labels:  cli
Bcrypt
A Java standalone implementation of the bcrypt password hash function. Based on the Blowfish cipher it is the default password hash algorithm for OpenBSD and other systems including some Linux distributions. Includes a CLI Tool.
Stars: ✭ 207 (-91.51%)
Mutual labels:  cli
Nord Xresources
An arctic, north-bluish clean and elegant Xresources color theme.
Stars: ✭ 210 (-91.39%)
Mutual labels:  cli
Procdump For Linux
A Linux version of the ProcDump Sysinternals tool
Stars: ✭ 2,507 (+2.79%)
Mutual labels:  cli

Build Status gojson

gojson generates go struct definitions from json or yaml documents.

Example

$ curl -s https://api.github.com/repos/chimeracoder/gojson | gojson -name=Repository

package main

type Repository struct {
	ArchiveURL       string      `json:"archive_url"`
	AssigneesURL     string      `json:"assignees_url"`
	BlobsURL         string      `json:"blobs_url"`
	BranchesURL      string      `json:"branches_url"`
	CloneURL         string      `json:"clone_url"`
	CollaboratorsURL string      `json:"collaborators_url"`
	CommentsURL      string      `json:"comments_url"`
	CommitsURL       string      `json:"commits_url"`
	CompareURL       string      `json:"compare_url"`
	ContentsURL      string      `json:"contents_url"`
	ContributorsURL  string      `json:"contributors_url"`
	CreatedAt        string      `json:"created_at"`
	DefaultBranch    string      `json:"default_branch"`
	Description      string      `json:"description"`
	DownloadsURL     string      `json:"downloads_url"`
	EventsURL        string      `json:"events_url"`
	Fork             bool        `json:"fork"`
	Forks            float64     `json:"forks"`
	ForksCount       float64     `json:"forks_count"`
	ForksURL         string      `json:"forks_url"`
	FullName         string      `json:"full_name"`
	GitCommitsURL    string      `json:"git_commits_url"`
	GitRefsURL       string      `json:"git_refs_url"`
	GitTagsURL       string      `json:"git_tags_url"`
	GitURL           string      `json:"git_url"`
	HasDownloads     bool        `json:"has_downloads"`
	HasIssues        bool        `json:"has_issues"`
	HasWiki          bool        `json:"has_wiki"`
	Homepage         interface{} `json:"homepage"`
	HooksURL         string      `json:"hooks_url"`
	HtmlURL          string      `json:"html_url"`
	ID               float64     `json:"id"`
	IssueCommentURL  string      `json:"issue_comment_url"`
	IssueEventsURL   string      `json:"issue_events_url"`
	IssuesURL        string      `json:"issues_url"`
	KeysURL          string      `json:"keys_url"`
	LabelsURL        string      `json:"labels_url"`
	Language         string      `json:"language"`
	LanguagesURL     string      `json:"languages_url"`
	MasterBranch     string      `json:"master_branch"`
	MergesURL        string      `json:"merges_url"`
	MilestonesURL    string      `json:"milestones_url"`
	MirrorURL        interface{} `json:"mirror_url"`
	Name             string      `json:"name"`
	NetworkCount     float64     `json:"network_count"`
	NotificationsURL string      `json:"notifications_url"`
	OpenIssues       float64     `json:"open_issues"`
	OpenIssuesCount  float64     `json:"open_issues_count"`
	Owner            struct {
		AvatarURL         string  `json:"avatar_url"`
		EventsURL         string  `json:"events_url"`
		FollowersURL      string  `json:"followers_url"`
		FollowingURL      string  `json:"following_url"`
		GistsURL          string  `json:"gists_url"`
		GravatarID        string  `json:"gravatar_id"`
		HtmlURL           string  `json:"html_url"`
		ID                float64 `json:"id"`
		Login             string  `json:"login"`
		OrganizationsURL  string  `json:"organizations_url"`
		ReceivedEventsURL string  `json:"received_events_url"`
		ReposURL          string  `json:"repos_url"`
		SiteAdmin         bool    `json:"site_admin"`
		StarredURL        string  `json:"starred_url"`
		SubscriptionsURL  string  `json:"subscriptions_url"`
		Type              string  `json:"type"`
		URL               string  `json:"url"`
	} `json:"owner"`
	Private         bool    `json:"private"`
	PullsURL        string  `json:"pulls_url"`
	PushedAt        string  `json:"pushed_at"`
	Size            float64 `json:"size"`
	SshURL          string  `json:"ssh_url"`
	StargazersURL   string  `json:"stargazers_url"`
	StatusesURL     string  `json:"statuses_url"`
	SubscribersURL  string  `json:"subscribers_url"`
	SubscriptionURL string  `json:"subscription_url"`
	SvnURL          string  `json:"svn_url"`
	TagsURL         string  `json:"tags_url"`
	TeamsURL        string  `json:"teams_url"`
	TreesURL        string  `json:"trees_url"`
	UpdatedAt       string  `json:"updated_at"`
	URL             string  `json:"url"`
	Watchers        float64 `json:"watchers"`
	WatchersCount   float64 `json:"watchers_count"`
}

CLI Installation

$ go get github.com/ChimeraCoder/gojson/gojson

Assuming $GOPATH/bin is in your PATH, you can now invoke gojson directly.

API Installation

$ go get github.com/ChimeraCoder/gojson/gojson

Development

$ git clone https://github.com/ChimeraCoder/gojson.git
$ cd gojson
$ go test

Building CLI

$ go build -o _build/gojson ./gojson

Installing CLI

$ go install ./gojson

Formatting

$ gofmt -w -e -s -l .

Related Work

github.com/str1ngs/jflect

License

gojson is free software distributed under Version 3 of the GNU Public License.

As of the time of writing, this is the same license used for gcc (and therefore gccgo), so it is unlikely to restrict use in any way. Note that the GPL does not extend to any output generated by gojson; the GPL only applies to software which includes copies of gojson itself.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].