Repository navigation
fix(concerto-core): serialize Map DateTime values without throwing TypeNotFoundException (#1546) - #1548
fix(concerto-core): serialize Map DateTime values without throwing TypeNotFoundException (#1546)#1548tushaar-05 wants to merge 1 commit into
Conversation
|
Hi @mttrbrts, Could you please review this PR when convenient? This fixes a Unit tests covering Thanks for your time! |
3571654 to
8337e95
Compare
…peNotFoundException (accordproject#1546) Closes accordproject#1546 Signed-off-by: Tushar Singh <tusharsingh222555@gmail.com>
8337e95 to
7e25379
Compare
|
This PR is stale because it has been open with no activity. Remove the stale label or comment to keep it active. Only items with maintainer engagement are auto-closed. |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Closes #1546
Summary
When serializing a Concerto resource that contains a
mapwhose value type isDateTime(or a scalar extendingDateTime),Serializer.toJSON()crashed withTypeNotFoundException: Namespace is not defined for type "DateTime". Additionally, map values containingnulltriggered an uncaught type lookup failure.This PR fixes map serialization in
JSONGeneratorso thatDayjsinstances are serialized to ISO-8601 formatted date-time strings respectingutcOffset,nullvalues are preserved, and type resolution viamodelManager.getType()is only performed for actual declared concept/asset models.Changes
JSONGenerator.visitMapDeclarationto:dayjsDateTimevalues to ISO-8601 strings respectingutcOffset.nullvalues so they do not trigger class declaration lookups.JSONGenerator.formatDateTimehelper reused by bothvisitMapDeclarationandconvertToJSON.packages/concerto-core/test/serializer/maptype/serializer.jscovering:dayjsDateTimevalues (Map<String, DateTime>).dayjsDateTimescalar values (Scalar extends DateTime).nullvalue.dayjsDateTimevalues respecting customutcOffset.Flags
Screenshots
Related Issues
Author Checklist
--signoffoption of git commit.mainfromfork:branchname