Coder Social home page Coder Social logo

kserd's People

Contributors

kurtlawrence avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

kserd's Issues

Deserialisation of escaped strings does not round trip

08:10:03 [ERROR] Failed initialising `wsps`: Failed to decode kserd: custom error: invalid type: string "<p style=\"color: red\">foo bar</p>", expected a borrowed string
08:10:03 [ERROR] Initialisation failed: Failed to decode kserd: custom error: invalid type: string "<p style=\"color: red\">foo bar</p>", expected a borrowed string

Blanket Kserds

Implement some blanket implementations of ToKserd

  • Box<T>
  • Result<T, E>
  • Option<T>
  • Tuples out to 16? 12

Convenience accessor for Cntr values

Create a convenience accessor for container values that can retrieve a value and pattern match it to a particular value. This is useful for asserting a field exists with a certain shape of data.

Crash in parsing

This parses fine:

[[list]]
"Hello, world!"

[[list]]
"This is a list"

[[list]]
"as entries"

[key]
    inner-item = "This is a container"
    num = 101
    another = "more words to write stuff"
    byte-array = b91'fdsaljfjdsa'

While this crashes (notice the extra line and \t):

[[list]]
"Hello, world!"

[[list]]
"This is a list"

[[list]]
"as entries"

[key]
    inner-item = "This is a container"
    num = 101
    another = "more words to write stuff"
    byte-array = b91'fdsaljfjdsa'
    

Number as_# are unsound

Test the number conversion methods as_u128 and as_i128 as a float value of -1 returns uint of 0.

Parsing of named tuples fails

Parsing of named tuples fails.

  • Test and fix parsing of named tuples
  • Test and fix parsing of named containers
  • Test and fix parsing of named sequences
  • Test and fix parsing of named maps

Printing ZSTs does not round trip

Printing a ZST will not parse back:

struct Foo;
let a = kserd::enc(&Some(Foo)).unwrap();
let kserd = kserd::parse::parse(a.as_str()).unwrap(); // fails

Check with enum types:

enum Foo {
    Bar(String),
    Zog
}

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.