Giter Site home page Giter Site logo

Fails to parse numbers about serde-xml-rs HOT 8 CLOSED

rreverser avatar rreverser commented on May 19, 2024
Fails to parse numbers

from serde-xml-rs.

Comments (8)

RReverser avatar RReverser commented on May 19, 2024

Hmm, that seems like a regression.

from serde-xml-rs.

farodin91 avatar farodin91 commented on May 19, 2024

Is solved with #20

from serde-xml-rs.

Dushistov avatar Dushistov commented on May 19, 2024

@RReverser

that seems like a regression

So there is version where number pasrsing works? Which one?

from serde-xml-rs.

kpcyrd avatar kpcyrd commented on May 19, 2024

I ran into this issue as well, this works:

#[derive(Debug, Deserialize)]
struct Foo {
    bar: u64,
}

let x = "<foo><bar>0</bar></foo>";
let y: Foo = serde_xml_rs::deserialize(x.as_bytes()).unwrap();

this doesn't

#[derive(Debug, Deserialize)]
struct Foo {
    bar: u64,
}

let x = "<foo bar=\"0\"></foo>";
let y: Foo = serde_xml_rs::deserialize(x.as_bytes()).unwrap();

I'd appreciate a patch on crates.io :)

from serde-xml-rs.

Michael-F-Bryan avatar Michael-F-Bryan commented on May 19, 2024

This works on master, so should we close the issue?

from serde-xml-rs.

oli-obk avatar oli-obk commented on May 19, 2024

Jup

from serde-xml-rs.

pftbest avatar pftbest commented on May 19, 2024

This doesn't work on crates.io

from serde-xml-rs.

frol avatar frol commented on May 19, 2024

Please, release a functional version on crates.io.

from serde-xml-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.