Skip to content

V2 : Issues with using JSON for serialization #502

Closed
@z3dev

Description

@z3dev

Expected Behavior

Serialization of arrays is correct.

Actual Behavior

Arrays are being serialized as objects with "0" to "N" attributes.

{"sides":[[{"0":78.9363021850586,"1":-17.02008819580078},{"0":85.4400405883789,"1":0}],[{"0":85.4400405883789,"1":0},{"0":78.9363021850586,"1":17.02008819580078}],[{"0":78.9363021850586,"1":17.02008819580078},{"0":60.41522979736328,"1":31.449024200439453}],[{"0":60.41522979736328,"1":31.449024200439453},{"0":32.69648742675781,"1":41.09012985229492}],[{"0":32.69648742675781,"1":41.09012985229492},{"0":5.231693493002029e-15,"1":44.47563552856445}],[{"0":5.231693493002029e-15,"1":44.47563552856445},{"0":-32.69648742675781,"1":41.09012985229492}],[{"0":-32.69648742675781,"1":41.09012985229492},{"0":-60.41522979736328,"1":31.449024200439453}],[{"0":-60.41522979736328,"1":31.449024200439453},{"0":-78.9363021850586,"1":17.02008819580078}],[{"0":-78.9363021850586,"1":17.02008819580078},{"0":-85.4400405883789,"1":5.446694595454167e-15}],[{"0":-85.4400405883789,"1":5.446694595454167e-15},{"0":-78.9363021850586,"1":-17.02008819580078}],[{"0":-78.9363021850586,"1":-17.02008819580078},{"0":-60.41522979736328,"1":-31.449024200439453}],[{"0":-60.41522979736328,"1":-31.449024200439453},{"0":-32.69648742675781,"1":-41.09012985229492}],[{"0":-32.69648742675781,"1":-41.09012985229492},{"0":-1.5695080055489613e-14,"1":-44.47563552856445}],[{"0":-1.5695080055489613e-14,"1":-44.47563552856445},{"0":32.69648742675781,"1":-41.09012985229492}],[{"0":32.69648742675781,"1":-41.09012985229492},{"0":60.41522979736328,"1":-31.449024200439453}],[{"0":60.41522979736328,"1":-31.449024200439453},{"0":78.9363021850586,"1":-17.02008819580078}]],"transforms":{"0":0.3511234521865845,"1":-0.936329185962677,"2":0,"3":0,"4":0.936329185962677,"5":0.3511234521865845,"6":0,"7":0,"8":0,"9":0,"10":1,"11":0,"12":130,"13":180,"14":0,"15":1}}

The geom2.isA() and geom3.isA() functions are failing because the objects are being brought back with transforms being an object, not an array.

Steps to Reproduce the Problem

  1. Load any design with a simple shape, like cube.
  2. There are no downloadable formats.

Specifications

  • Version: V2
  • Platform: WEB
  • Environment: All browsers

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions