Hello,

i'm asking about positive number beacause when I try, for example:

<?xml version="1.0" encoding="UTF-8"?>
<MsgFile Language="en">
  <MsgDomain Domain="asd">
    <Message Id="100" Name="ErrorNumber">Message about some error number</Message>
    <Message Id="b" Name="ErrorName2">Message about some error 2 %1 %2</Message>
  </MsgDomain>
</MsgFile>

And then I use the terminal, but this doesn't work in the same way as letters or negative number..

>Write ##class(%MessageDictionary).Import("C:\--\CodigosError_20170628.xml")
1
>Set status=$System.Status.Error("100")                                    
>Do $SYSTEM.OBJ.DisplayError(status)                                       
ERROR #100: Código estado desconocido: 100 )

Ok!

I have been investigating...

I found a approximation that i want to do...

First of all, I want to iterate over JSON and capture de information

set a = "[{""Center"" : ""DKV"",""Nif"" :""00000001T"",""NumberCenter"" :""DKV_1"",""Name"" : ""Nombre_DKV""},{""Center"" : ""Vivisol"",""Nif"" : ""00000002T"",""NumberCenter"" : ""Vivisol_1"",""Name"" : ""Nombre_vivisol"",},{""Center"" : ""Stacks"",""Nif"" : ""00000003T"",""NumberCenter"" : ""Stacks_1"",""Name"" : ""Nombre_Stacks"",}]"
set JSON = ##class(%DynamicAbstractObject).%FromJSON(a) 
set iter = JSON.%GetIterator() 
while iter.%GetNext(.key,.value){write "Center = " _value.Center ,! }

Second i want to put it in my object...  still investigating more about this

 

I'm sorry I think that i'm not explain very good. I'll try to do better...

I create a Operation REST API , when I call to my client trough this REST API, my cliente returns list of object in JSON, like that:

[
    {
    "Center" : "aaaaaaaaaa",
    "Nif" : "00000000T",
    "NumberCenter" : "00000000",
    "Name" : "ppppp",
    },
    {
    "Center" : "aaaaaaaaaa",
    "Nif" : "00000000T",
    "NumberCenter" : "00000000",
    "Name" : "ppppp",
    },
    {
    "Center" : "aaaaaaaaaa",
    "Nif" : "00000000T",
    "NumberCenter" : "00000000",
    "Name" : "ppppp",
    }
]

On the other hand, I have in my Ensemble, Two class:

Class A --> lisf of class B

Class B --> Center, Nif,NumberCenter, Name

I need to iterate over JSON and capture de information a put this in my object A