Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-436

Gson codec lost correct type

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 2909

    Description

      Hi,

      I have a problem with parse xml to json. If I do double referencing on leaf, gson evaluates type of uint32 like string.

      input:
      <cont xmlns="main:module"
      xmlns:cont-augment-module="cont:augment:module">
      <cont-augment-module:lf7>200</cont-augment-module:lf7>
      </cont>

      yang context (for full files see attachments):
      module main-module {
      namespace "main:module";

      prefix "mainmod";
      revision 2013-12-2 {
      }

      container cont {
      leaf lf1

      { type uint32; }

      }
      }

      module cont-augment-module {
      namespace "cont:augment:module";

      prefix "cntaugmod";

      import main-module

      {prefix mamo; revision-date 2013-12-2;}

      revision 2013-12-2 {
      }

      augment "/mamo:cont" {
      leaf lf4 {
      type leafref

      { path "../mamo:lf1"; }

      }

      leaf lf7 {
      type leafref

      { path "../lf4"; }

      }
      }
      }

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jhajnar@cisco.com Jan Hajnar
            jakubtoth-0 Jakub Toth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: