Page MenuHomeFeedback Tracker

Feature request: Add JsonApiStruct.OnStartObject and OnEndObject
Feedback, NormalPublic

Description

JsonApiStruct currently has OnObject, but this is not usable for dynamic parsing because it requires to have a class on hand that represents the object structure. It would be more useful to handle JSON objects as what they actually are, which is associative arrays (i.e. map type in EnforceScript).

This could be handled by adding OnStartObject and OnEndObject methods. They should function similarly to OnStartArray and OnEndArray, e.g.

OnStartObject(string name);
OnEndObject(int itemCount);

No specific OnString/OnInt etc methods are needed for associative arrays, it can just use the existing OnString/OnInt etc methods.

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Modding

Event Timeline

lava76 created this task.Jan 15 2024, 5:11 PM
Geez changed the task status from New to Feedback.Jan 16 2024, 10:22 AM