Popularity
2.7
Growing
Activity
1.9
Growing
29
3
9
Programming language: Go
License: MIT License
Tags:
Utility
Text Processing
xj2go alternatives and similar packages
Based on the "Utility" category.
Alternatively, view xj2go alternatives based on common mentions on social networks and blogs.
-
Koazee
A StreamLike, Immutable, Lazy Loading and smart Golang Library to deal with slices. -
strutil-go
Golang metrics for calculating string similarity and other string utility functions -
regroup
Match regex group into go struct using struct tags and automatic parsing -
html2data
Library and cli for extracting data from HTML via CSS selectors -
frontmatter
Go library for detecting and decoding various content front matter formats -
Tagify
Tagify produces a set of tags from a given source. Source can be either an HTML page, a Markdown document or a plain text. Supports English, Russian, Chinese, Hindi, Spanish, Arabic, Japanese, German, Hebrew, French and Korean languages. -
TySug
A project around helping to prevent typing typos. TySug (Typo Suggestions) suggests alternative words with respect to keyboard layouts -
parseargs-go
A string argument parser that understands quotes and backslashes
Access the most powerful time series database as a service
Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
Promo
www.influxdata.com
Do you think we are missing an alternative of xj2go or a related project?
Popular Comparisons
README
xj2go
The goal is to convert xml or json file to go struct file.
Usage
Download and install it:
$ go get -u -v github.com/wk30/xj2go/cmd/...
$ xj [-t json/xml] [-p sample] [-r result] sample.json
Import it in your code:
import "github.com/wk30/xj2go"
Example
Please see [the example file](example/sample.go).
package main
import (
"io/ioutil"
"log"
"github.com/wk30/xj2go"
)
func main() {
xmlfilename := "../testxml/xl/styles.xml"
xj1 := xj2go.New(xmlfilename, "demoxml", "")
xj1.XMLToGo()
b1, err := ioutil.ReadFile(xmlfilename)
if err != nil {
log.Fatal(err)
}
if err := xj2go.XMLBytesToGo("test", "demoxml2", &b1); err != nil {
log.Fatal(err)
}
jsonfilename := "../testjson/githubAPI.json"
xj2 := xj2go.New(jsonfilename, "demojson", "sample")
xj2.JSONToGo()
b2, err := ioutil.ReadFile(jsonfilename)
if err != nil {
log.Fatal(err)
}
if err := xj2go.JSONBytesToGo("test", "demojson2", "github", &b2); err != nil {
log.Fatal(err)
}
}