Code Monkey home page Code Monkey logo

Comments (3)

dtolnay avatar dtolnay commented on June 21, 2024

"Stray :" is not necessarily invalid YAML. You are just showing an excerpt of the output but the following is valid YAML syntax:

?
    SelectionMarker:
      color:
        r: 1.0
        g: 1.0
        b: 1.0
      is_visible: true
      is_selected: false
:
      food: 30.0
      food_current: 30.0
      water: 20.0

from serde-yaml.

dtolnay avatar dtolnay commented on June 21, 2024

Since what you showed is valid YAML, this issue is not going to be actionable unless you can provide a minimal repro of incorrect behavior.

from serde-yaml.

Danvil avatar Danvil commented on June 21, 2024

There is no ? before in the file. There is simply content missing at the location where the : appears in the file. The emitted file does not pass the serialize - deserialize test and panics during deserialization with serde_yaml.

When I switch to JSON by simply replacing serde_yaml::to_writer with serde_json::to_writer_pretty it is working fine.

from serde-yaml.

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.