Coder Social home page Coder Social logo

cogs's People

Contributors

evshvarov avatar seanconnelly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cogs's Issues

Depth limiting or output-once strategy

Consider the following two classes:

Class Cogs.Test.Parent Extends (%Persistent, Cogs.JsonClass)
{

Property Child As Child;

/// do ##class(Cogs.Test.Parent).Test()
ClassMethod Test()
{
	do ..%KillExtent()
	do ##class(Cogs.Test.Child).%KillExtent()
	
	set obj = ..%New()
	do obj.ChildSetObjectId(1)
	w obj.%Save(),!
	
	set child = ##class(Cogs.Test.Child).%New()
	do child.ParentSetObjectId(1)
	w child.%Save(),!
	
	kill
	
	set obj = ..%OpenId(1)
	w obj.toJSON()
}
}

and:

Class Cogs.Test.Child Extends (%Persistent, Cogs.JsonClass)
{

Property Parent As Parent;
}

Calling do ##class(Cogs.Test.Parent).Test() causes error. Limiting traversal depth or implementing output-once strategy can solve this problem.
XML with classes.

Parsing fails on specific message construct

A message with the following layout fails parsing:
{
"MandateListDto": [{
"Id": "40444019-fb52-40bd-82fa-be3d51a90ac8",
"Name": "TestDebtor",
"CreationDateUtc": "2017-07-15T08:25:59.6670000Z",
"MandateStatus": {
"Status": "Rejected",
"AuthenticationDate": "2017-07-15T00:00:00.0000000Z",
"MandateBankReferenceNumber": "",
"RejectReasons": [""]
}
}],
"PageIndex": 1,
"PageSize": 1,
"ErrorList": [],
"ResponseUtcTime": "2017-07-16T10:28:42.8798267Z",
"UserFriendlyDisplayList": []
}

It tries to parse the PageIndex property into the MandateStatus object.

I resolved this by inserting this line prior to "if "}]"[pre continue"
if ("}"=c),(ctype="") g END

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.