Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format is are to parse, we need a token.... #1

Open
RobertLRead opened this issue Jul 11, 2023 · 0 comments
Open

Format is are to parse, we need a token.... #1

RobertLRead opened this issue Jul 11, 2023 · 0 comments
Assignees

Comments

@RobertLRead
Copy link
Contributor

Dear Geoff,

I'm a little stuck. The parsing code seems to look for a token (and open bracket '['). The "cJSON_printStruct" produces the below example. It looks like a bracket is opening arrays, which is fine. I like your idea of using a simple prefix toekn to start each line. However, it is unclear to me where in cJSON_PrintStruct I would add this. The buffer manipulation is opaque.

I'm tempted to say that at line 1793 I could change:
strcpy(prefix,"");
to
strcpy(prefix,"[");
and that might work---but I'm unclear if I need to change byte counts in that case.

Maybe you can fix this or give me some guidance as to the best place to fix it.

Name. Experiment#1 TimeStamp. 1680759024 DryRun. false Nonce. 357 MaxDeltaC. 5 [ States.State.Name. Warmup [ States.State.Phases.Duration. 3600 States.State.Phases.Fan.Speed. 20 States.State.Phases.Heater.Temp. 400 States.State.Phases.Heater.Current. 10 States.State.Phases.Heater.Ramp. 40 States.State.Phases.Stack.Temp. 400 States.State.Phases.Stack.Current. 60 States.State.Phases.Stack.Ramp. 5 [ States.State.Name. Cooldown [ States.State.Phases.Duration. -1 States.State.Phases.Fan.Speed. 30 States.State.Phases.Heater.Temp. 35 States.State.Phases.Heater.Current. 10 States.State.Phases.Heater.Ramp. 4 States.State.Phases.Stack.Temp. 35 States.State.Phases.Stack.Current. 0 States.State.Phases.Stack.Ramp. 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants