ERROR <Ens>ErrParsingExpression: Error al analizar la expresión 'Document.myList.GetAt(1)="AA"': ERROR <Ens>ErrInvalidToken: Token no válido en el desplazamiento 22
  > ERROR #5490: Error $ZE='HCIS.Rules.Test:evaluateRuleDefinition' al ejecutar el generador del método '%2'.
    > ERROR #5030: Se produjo un error mientras se compilaba la clase HCIS.Rules.Test

PERFECT !!

I see now my mistake smiley

I fixed the code like this:

Class test.DummyClass Extends %RegisteredObject
{
Property notanumber As %String;
Property aboolean As %Boolean;
Method outout2JSON()
{
    set tBody = ##class(%GlobalCharacterStream).%New()
    do ##class(Ens.Util.JSON).ObjectToJSONStream(##this,.tBody,"aelotw")
    w tBody.Read()
}
ClassMethod Test()
{
    set dummy = ##class(test.DummyClass).%New()
    set dummy.notanumber = "28001"
    set dummy.aboolean = 1
    do dummy.outout2JSON()
}
}
 

And now:

USER>do ##class(test.DummyClass).Test()
{
        "notanumber":"28001",
        "aboolean":true
}

Stefan. I used a registered class with typed properties and doesn't works frown

I made this test class:

Class test.DummyClass Extends %RegisteredObject
{

Property notanumber As %String;

Property aboolean As %Boolean;

Method outout2JSON()
{
    set tProxyRequest = ##class(%ZEN.proxyObject).%New()
    set tProxyRequest.notanumber = ..notanumber
    set tProxyRequest.aboolean = ..aboolean
    
    set tBody = ##class(%GlobalCharacterStream).%New()
    do ##class(Ens.Util.JSON).ObjectToJSONStream(tProxyRequest,.tBody,"aelotwu")
    w tBody.Read()
}

ClassMethod Test()
{
    set dummy = ##class(test.DummyClass).%New()
    set dummy.notanumber = "28001"
    set dummy.aboolean = 1
    do dummy.outout2JSON()
}

}

And this is the result sad:

USER>do ##class(test.DummyClass).Test()
{
        "aboolean":1,
        "notanumber":28001
}
USER>w $zv
Cache for Windows (x86-64) 2015.2.1 (Build 705U) Mon Aug 31 2015 16:45:59 EDT

 

What's wrong?

Thanks

Thanks Timur, I want to use Atelier, but in that case the source classes are not XML projected. There is any "indication" about the Repository format.

In other hand, yes, I know how to create and publish the Repository, but my doubt is about how to fork it on https://github.com/intersystems, I guess you re-create the repository there, true?

Thanks for the clarification