The JSON value could not be converted to System.Int32 : Handle Pnp Provisioning template extraction failure from Project Management site template #1058
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cant extract Pnp Provisioning template from Project Management site template
Get-PnPSiteTemplate fails with the following error.
The JSON value could not be converted to System.Int32. Path: $.position.sectionIndex | LineNumber: 0 | BytePositionInLine: 107.
The issue is in pnpcore while Deserializing the controlDataJson.
The sample JSON for which the failure occurs:
controlDataJson: {"controlType":4,"id":"00000000-0000-0000-0000-100000000005","position":{"zoneIndex":1.0,"sectionIndex":2.0,"controlIndex":2.0,"sectionFactor":6,"layoutIndex":1},"emphasis":{}}
controlDataJson: {"controlType":3,"id":"00000000-0000-0000-0000-100000000006","position":{"zoneIndex":1.0,"sectionIndex":2.0,"controlIndex":3.0,"sectionFactor":6,"layoutIndex":1},"webPartId":"8654b779-4886-46d4-8ffb-b5ed960ee986","emphasis":{},"addedFromPersistedData":true}
The parser is failing to read
"sectionIndex":2.0
property which is defend asint
in CanvasPosition.cs but the actual value in JSON isfloat