Popularity
0.9
Stable
Activity
0.0
Stable
8
1
2
Programming language: Go
License: Apache License 2.0
encdec alternatives and similar packages
Based on the "Specific Formats" category.
Alternatively, view encdec alternatives based on common mentions on social networks and blogs.
-
sh
A shell parser, formatter, and interpreter with bash support; includes shfmt -
bluemonday
bluemonday: a fast golang HTML sanitizer (inspired by the OWASP Java HTML Sanitizer) to scrub user generated content of XSS -
mxj
Decode / encode XML to/from map[string]interface{} (or JSON); extract values with dot-notation paths and wildcards. Replaces x2j and j2x packages. -
html-to-markdown
โ๏ธ Convert HTML to Markdown. Even works with entire websites and can be extended through rules. -
omniparser
omniparser: a native Golang ETL streaming parser and transform library for CSV, JSON, XML, EDI, text, etc. -
go-pkg-rss
This package reads RSS and Atom feeds and provides a caching mechanism that adheres to the feed specs. -
goq
A declarative struct-tag-based HTML unmarshaling or scraping package for Go built on top of the goquery library -
goribot
A simple golang spider/scraping framework,build a spider in 3 lines. -
xquery
XQuery lets you extract data from HTML/XML documents using XPath expression. -
gospider
โก Light weight Golang spider framework | ่ฝป้็ Golang ็ฌ่ซๆกๆถ -
github_flavored_markdown
GitHub Flavored Markdown renderer with fenced code block highlighting, clickable header anchor links. -
go-pkg-xmlx
Extension to the standard Go XML package. Maintains a node tree that allows forward/backwards browsing and exposes some simple single/multi-node search functions. -
pagser
Pagser is a simple, extensible, configurable parse and deserialize html page to struct based on goquery and struct tags for golang crawler -
csvplus
csvplus extends the standard Go encoding/csv package with fluent interface, lazy stream operations, indices and joins. -
gonameparts
Takes a full name and splits it into individual name parts -
codetree
:evergreen_tree: Parses indented code and returns a tree structure. -
jsoncolor
Colorized JSON output for Go https://godoc.org/github.com/nwidger/jsoncolor
Free Global Payroll designed for tech teams
Building a great tech team takes more than a paycheck. Zero payroll costs, get AI-driven insights to retain best talent, and delight them with amazing local benefits. 100% free and compliant.
Promo
try.revelo.com
Do you think we are missing an alternative of encdec or a related project?
Popular Comparisons
README
encoding
Package provides a generic interface to encoders and decoders
Example
package main
import (
"flag"
"fmt"
"log"
"strings"
"github.com/mickep76/encoding"
_ "github.com/mickep76/encoding/json"
_ "github.com/mickep76/encoding/toml"
_ "github.com/mickep76/encoding/yaml"
)
type Message struct {
Name, Text string
}
type Messages struct {
Messages []*Message
}
func main() {
codec := flag.String("codec", "json", fmt.Sprintf("Codecs: [%s].", strings.Join(encoding.Codecs(), ", ")))
indent := flag.String("indent", "", "Indent encoding (only supported by JSON codec)")
flag.Parse()
in := Messages{
Messages: []*Message{
&Message{Name: "Ed", Text: "Knock knock."},
&Message{Name: "Sam", Text: "Who's there?"},
&Message{Name: "Ed", Text: "Go fmt."},
&Message{Name: "Sam", Text: "Go fmt who?"},
&Message{Name: "Ed", Text: "Go fmt yourself!"},
},
}
var opts []encoding.Option
if *indent != "" {
opts = append(opts, encoding.WithIndent(*indent))
}
c, err := encoding.NewCodec(*codec, opts...)
if err != nil {
log.Fatal(err)
}
b, err := c.Encode(in)
if err != nil {
log.Fatal(err)
}
fmt.Printf("Codec: %s\n", *codec)
fmt.Printf("Encoded:\n%s\n", string(b))
out := Messages{}
if err := c.Decode(b, &out); err != nil {
log.Fatal(err)
}
fmt.Println("Decoded:")
for _, m := range out.Messages {
fmt.Printf("%s: %s\n", m.Name, m.Text)
}
}
*Note that all licence references and agreements mentioned in the encdec README section above
are relevant to that project's source code only.