Skip to content

anyxml: different paths obtained from JSON and XML #2015

@jktjkt

Description

@jktjkt

These two inputs are equivalent; libyang can load either, and when asked to save in the other format, the exact same string is produced:

  • <ax xmlns="http://example.com/coze"><x>1</x><x>2</x><x>3</x></ax>
  • {"example-schema:ax":{"x":[1,2,3]}}

But when I iterate over the content of the resulting data nodes and call lyd_path on them, the version which was read from XML returns /example-schema:x, and the version read from JSON returns just /x. I think that both of these should behave in the same way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    is:enhancementRequest for adding new feature or enahncing functionality.status:completedFrom the developer perspective, the issue was solved (bug fixed, question answered,...)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions