Skip to content

JSON 'sessionDuration' is string while 'caloriesBurned' / 'prCount' are numbers #36

@DTTerastar

Description

@DTTerastar

Command

liftoff-export workouts list --since 7d --format json | jq '.[0] | {sessionDuration: .sessionDuration|type, caloriesBurned: .caloriesBurned|type, prCount: .prCount|type}'

Actual

{
  "sessionDuration": "string",
  "caloriesBurned": "number",
  "prCount": "number"
}

Expected

Per the same reasoning as #33 (consistent JSON types across fields and subcommands), numeric-looking fields should consistently be numbers. sessionDuration arriving as a string forces downstream tools to special-case parse it before doing arithmetic. Pick a single shape (number — likely seconds or minutes) and apply across workouts list/workouts show.

Severity

major

Metadata

Metadata

Assignees

Labels

area:format--format markdown/json/csv and codec behavior.kind:bugObserved behavior diverges from documented behavior.priority:mediumReproducible bug or gap with a workaround, or a well-scoped enhancement clearly in charter.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions