Homebrew Read and Parse a JSON File Stored at the Root of SD Card (SDMC) in C++ (devkitPro)

Adel

Member
OP
Newcomer
Joined
Nov 29, 2016
Messages
8
Trophies
0
Age
120
XP
121
Country
Canada
Hi,
I am trying to read and parse a JSON file stored at the root of 3DS SD Card (SDMC) into a data structure in C++.

Say I have a people.json file which looks like this:
Code:
 {"Anna" : { 
      "age": 18,
      "profession": "student"},
 "Ben" : {
      "age" : 19,
      "profession": "mechanic"}
 }

Can I create some sort of data structure people which I can index by Anna and Ben as well as age and profession? What would be the data type of people? I thought it would be something similar to a (nested) map, but map values always have to have the same type, don't they?

I have worked with python before and my "goal" (which may be ill-set for C++) is to obtain the equivalent of a nested python dictionary.

Thanks.


Sent from my iPhone using Tapatalk
 
Last edited by Adel,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://youtu.be/MddR6PTmGKg?si=mU2EO5hoE7XXSbSr