Thanks to visit codestin.com
Credit goes to github.com

Skip to content

sanyo0714/dns-json-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dns-json-go

DNS JSON parser

dns to json

msg := new(dns.Msg)
...
dnsMsg := &dnsjson.DNSMsg{msg}
respJSON, err := dnsMsg.DNS2JSON()
respStr, err := json.Marshal(respJSON)
log.Println(string(jsonByte))

json to dns

jsonByte = ...
...
jsonMsg := &jsondns.JSONMsg{}
json.Unmarshal(jsonByte, jsonMsg)
log.Println(jsonMsg)

About

DNS JSON parser

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages