Skip to content

Using Flexible layouts: The JSON value could not be converted to System.Int32 #1685

@PedroMordeP

Description

@PedroMordeP

Category

  • Bug

Describe the bug

I'm using the PnP.Core and PnP.Framework 1.15.135-nightly

When creating a template with flexible Layout it gives the error "The JSON value could not be converted to System.Int32. Path: $.flexibleLayoutPosition.lg.h | LineNumber: 0 | BytePositionInLine: 367."

This happens due to the properties should be integers and in my object, one of them is not (the "h":4.4186046511627906).

{"position":{"layoutIndex":1,"zoneIndex":5,"zoneId":"d310b4b8-0dba-4778-a199-717087cd01fb","sectionIndex":2,"sectionFactor":6,"controlIndex":1},"emphasis":{"zoneEmphasis":0},"id":"6f9d5119-ef3d-4e79-bf64-86038da7520b","controlType":4,"isFromSectionTemplate":false,"addedFromPersistedData":true,"flexibleLayoutPosition":{"lg":{"x":5,"y":5,"w":22,"h":4.4186046511627906,"dataVersion":"1.0"}},"contentVersion":5}

Can this be changed to double? Are there any implications of changing this?

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions