Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A ArduinoJson
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Benoît Blanchon
  • ArduinoJson
  • Issues
  • #34
Closed
Open
Issue created Dec 07, 2014 by Administrator@rootContributor

Add support for C99 types

Created by: shreyasbharath

Hi again,

At the moment, the library only supports a single non-portable unsigned type (long) and double.

long time          = root["time"];
jsonObject["time" = (long)time;   // If time is a uint32_t

Would it be possible to add support for C99 types (e.g. uint8_t, uint16_t, uint32_t, int8_t and float etc.) for accessing and setting JSON values? This would get rid of a lot of unnecessary casts in codebases that use C99 types like ours.

uint32_t time          = root["time"];
jsonObject["time"]  = time;

Thanks!

Assignee
Assign to
Time tracking