sbabiv / xml2map Goto Github PK
View Code? Open in Web Editor NEWXML to MAP converter written Golang
License: MIT License
XML to MAP converter written Golang
License: MIT License
A panic is triggered while decoding atom document with:
<atom:link href="http://www.example.com/rss.xml" rel="self" type="application/rss+xml" />
panic: interface conversion: interface {} is map[string]interface {}, not string
goroutine 1 [running]:
github.com/sbabiv/xml2map.setNodeValue(0xc000060230)
/tmp/gopath700616318/pkg/mod/github.com/sbabiv/[email protected]/decoder.go:138 +0x965
github.com/sbabiv/xml2map.(*Decoder).Decode(0xc000086f40)
/tmp/gopath700616318/pkg/mod/github.com/sbabiv/[email protected]/decoder.go:109 +0x2af
main.main()
/tmp/sandbox2063523566/prog.go:29 +0xb6
Removing the :link
suffix from the element resolves the issue, see also this example:
I found that when I unmarshal string to map, this package trims all values.
I want to remove this behavior because for my app it is necessary to work with the same data as user sent.
How I can do it?
Hi, do you plan to do encoder?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.