Actions
Bug #6562
closedCasting XdmValue from parseJson to XdmMap causes casting problems in C++ for mapSize
Start date:
2024-10-17
Due date:
% Done:
100%
Estimated time:
Applies to branch:
12, trunk
Fix Committed on Branch:
12, trunk
Fixed in Maintenance Release:
Found in version:
Fixed in version:
SaxonC Languages:
All
SaxonC Platforms:
All
SaxonC Architecture:
Description
I noticed some strange casting issue of XdmValue to XdmMap via the parseJsonFromString
method.
The map_size variable is corrupted in the class XdmMap
.
See example:
XdmValue * signatureValue = parseJsonFromString(signature);
XdmItem * item = signatureValue->getHead();
if(item->isMap()) {
XdmMap *xdmMap = (XdmMap *) item;
int size = xdmMap->mapSize(); // problem here
}
Updated by O'Neil Delpratt about 2 months ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
- Fix Committed on Branch 12, trunk added
Bug fixed on the saxon12 and main branches. The XdmMap class has been simplified by removing redundant code.
Also we now create the XdmMap class object from parseJson
if the type returned is an Xdm map.
Please register to edit this issue
Actions