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
  • #77
Closed
Open
Issue created May 22, 2015 by Administrator@rootContributor

encoding JSON with char* giving some problems

Created by: gigi199596

Hello,

So first, let me thank you for all this amazing work, the JSON is working great but I found something a little disturbing.

I use this in my JSON encoder:

char temp[25]; ... (timeSaver.TO_STRING_TIME()).toCharArray(temp, 25); root["time"] = temp;

TO_STRING_TIME() returns me the actual time like "07:26:59" in the String format. I convert it to char* because a string in your JSON encoder gives "true" in the browser... Don't know why neither. And I get this output in my JSON in the browser: "time": "Ⱥ\b";

Or when I print temp to the serial output, it gives me the correct value of "temp". What am I doing wrong? thx a lot for your help

Assignee
Assign to
Time tracking