Skip to content

[Bug]: shape.getProperties output in json-mode is incorrectly constructed from StrProp #5927

@Maklgu

Description

@Maklgu

Describe the Bug

If shape.getProperties is called with a delimiter "json", then a field bounds will be constructed incorrectly: there will be no field bounds containing StrProp object with all the fields, but the field bounds containing a part of the StrProp until the first ";" and all the other fields of StrProp with their value, so shape.getProperties output gets extra fields.

To Reproduce

Execute

[h: shape.create("square", "", true, "rectangle", json.set("","x", 300,"y", 300,"w", 150,"h", 150))]
[r: "<pre>"+shape.getProperties("square")+"</pre>"]
[r: "<pre>"+json.indent(shape.getProperties("square", "json"),3)+"</pre>"]

and compare bounds field for these to outputs of shape.getProperties.

Expected Behaviour

Quotes should not be ignored during construction of the JSON-object.

Screenshots

No response

MapTool Info

1.18.3

Desktop

Windows

Additional Context

No response

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions