Skip to content

encoding object with / field should drop other feilds #86

@Gozala

Description

@Gozala

Here is an example code to reproduce the problem:

const block = json.encode({
   hello: {
     '/': 'baguqeeratmwuhl736sndm4bi34xbifhyjqhatgwjrq6vjkfiafl7253rv4sq',
     message: 'hello'
   }
})
   
const data = json.decode(block) // Error: Invalid encoded CID form

I would expect encoder to just ignore message field of the hello and encode it as link as opposed to encoding it into an invalid block.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions