Coder Social home page Coder Social logo

Comments (4)

mkovatsc avatar mkovatsc commented on July 20, 2024

Done in 955f67d

bytesToValue() now also gets the DataSchema and the parameters part of the content type.

from node-wot.

6d77 avatar 6d77 commented on July 20, 2024

Hi Matthias,

two comments to your commit:

  1. The current implementation passes the first parameter of a content type to the bytesToValue method of a Codec. This might not be sufficient as multiple parameters are possible, see e.g. https://www.w3.org/Protocols/rfc1341/4_Content-Type.html and observe the * before parameter. Multiple parameters are separated by ;. As nearly every codec using parameters has to parse them and as each parameter MUST consist of key=value it would be beneficial if the parsing is already done before and e.g. a Map is used as parameter type of bytesToValue.
  2. Not only bytesToValue, but also valueToBytes needs this information to determine the encoding. This is still missing. Please add schema and parameters. Schema may be useful to determine whether a number is an integer or a float.

@mkovatsc : If you agree with my comment, could you please re-open this issue?

from node-wot.

danielpeintner avatar danielpeintner commented on July 20, 2024

@6d77 is this issue still relevant or resolved by now?

from node-wot.

6d77 avatar 6d77 commented on July 20, 2024

is already solved

from node-wot.

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.