[YANGTOOLS-436] Gson codec lost correct type Created: 27/Mar/15  Updated: 10/Apr/22  Resolved: 07/Apr/15

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Jakub Toth Assignee: Jan Hajnar
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: File cont-augment-module.yang     File main-module.yang    
External issue ID: 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"; }

}
}
}



 Comments   
Comment by Jakub Toth [ 27/Mar/15 ]

Attachment main-module.yang has been added with description: main-modul.yang

Comment by Jakub Toth [ 27/Mar/15 ]

Attachment cont-augment-module.yang has been added with description: cont-augment-module.yang

Comment by Jan Hajnar [ 30/Mar/15 ]

fix:
https://git.opendaylight.org/gerrit/#/c/17338/

Generated at Wed Feb 07 20:53:14 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.