Question JSON

Vous débutez et vous avez besoin d'aide ? N'hésitez pas à poser vos questions
Shadow
Messages : 1413
Inscription : mer. 04/nov./2015 17:39

Re: Question JSON

Message par Shadow »

J'ai avancé un peu, voici ce que j'ai réussi à faire :)

Code : Tout sélectionner

If CreateJSON(0)
  
  Niveau1 = SetJSONObject(JSONValue(0))
  Famille = AddJSONMember(Niveau1, "Famille")
  
    Niveau2 = SetJSONObject(Famille)
    Membres = AddJSONMember(Niveau2, "Membres")
    
      Niveau3 = SetJSONObject(Membres)
      Parents = AddJSONMember(Niveau3, "Parents")
      
        Niveau4 = SetJSONObject(Parents)
        
          Papa = AddJSONMember(Niveau4, "Luck")
          
            Niveau5 = SetJSONObject(Papa)
          
              Age = AddJSONMember(Niveau5, "Âge")
              ValeurAge = SetJSONInteger(Age, 35)
              
              Taille = AddJSONMember(Niveau5, "Taille")
              ValeurTaille = SetJSONInteger(Taille, 175)
              
              Poid = AddJSONMember(Niveau5, "Poig")
              Valeurpoid = SetJSONInteger(Poid, 95)
              
          Maman = AddJSONMember(Niveau4, "Lise")
              
            Niveau5 = SetJSONObject(Maman)
          
              Age = AddJSONMember(Niveau5, "Âge")
              ValeurAge = SetJSONInteger(Age, 32)
              
              Taille = AddJSONMember(Niveau5, "Taille")
              ValeurTaille = SetJSONInteger(Taille, 168)
              
              Poid = AddJSONMember(Niveau5, "Poig")
              ValeurPoid = SetJSONInteger(Poid, 75)
              
      Enfants = AddJSONMember(Niveau3, "Enfants")
      
        Niveau4 = SetJSONObject(Enfants)
        
          Enfant1 = AddJSONMember(Niveau4, "John")
          
            Niveau5 = SetJSONObject(Enfant1)
          
              Age = AddJSONMember(Niveau5, "Âge")
              ValeurAge = SetJSONInteger(Age, 8)
              
              Taille = AddJSONMember(Niveau5, "Taille")
              ValeurTaille = SetJSONInteger(Taille, 121)
              
              Poid = AddJSONMember(Niveau5, "Poig")
              ValeurPoid = SetJSONInteger(Poid, 35)
              
          Enfant2 = AddJSONMember(Niveau4, "Alice")
              
            Niveau5 = SetJSONObject(Enfant2)
          
              Age = AddJSONMember(Niveau5, "Âge")
              ValeurAge = SetJSONInteger(Age, 7)
              
              Taille = AddJSONMember(Niveau5, "Taille")
              ValeurTaille = SetJSONInteger(Taille, 111)
              
              Poid = AddJSONMember(Niveau5, "Poig")
              ValeurPoid = SetJSONInteger(Poid, 25)
              
          Enfant3 = AddJSONMember(Niveau4, "Tom")
          
            Niveau5 = SetJSONObject(Enfant3)
          
              Age = AddJSONMember(Niveau5, "Âge")
              ValeurAge = SetJSONInteger(Age, 9)
              
              Taille = AddJSONMember(Niveau5, "Taille")
              ValeurTaille = SetJSONInteger(Taille, 131)
              
              Poid = AddJSONMember(Niveau5, "Poig")
              ValeurPoid = SetJSONInteger(Poid, 40)
              
          Enfant4 = AddJSONMember(Niveau4, "Jule")
          
            Niveau5 = SetJSONObject(Enfant4)
          
              Age = AddJSONMember(Niveau5, "Âge")
              ValeurAge = SetJSONInteger(Age, 11)
              
              Taille = AddJSONMember(Niveau5, "Taille")
              ValeurTaille = SetJSONInteger(Taille, 141)
              
              Poid = AddJSONMember(Niveau5, "Poig")
              ValeurPoid = SetJSONInteger(Poid, 50)
              
      Debug ComposeJSON(0, #PB_JSON_PrettyPrint)
      
EndIf
Ce qui donne:

Code : Tout sélectionner

{
  "Famille": {
      "Membres": {
          "Enfants": {
              "Alice": {
                  "Âge"   : 7,
                  "Taille": 111,
                  "Poig"  : 25
                },
              "Tom"  : {
                  "Âge"   : 9,
                  "Taille": 131,
                  "Poig"  : 40
                },
              "Jule" : {
                  "Âge"   : 11,
                  "Taille": 141,
                  "Poig"  : 50
                },
              "John" : {
                  "Âge"   : 8,
                  "Taille": 121,
                  "Poig"  : 35
                }
            },
          "Parents": {
              "Lise": {
                  "Âge"   : 32,
                  "Taille": 168,
                  "Poig"  : 75
                },
              "Luck": {
                  "Âge"   : 35,
                  "Taille": 175,
                  "Poig"  : 95
                }
            }
        }
    }
}
Processeur: Intel Core I7-4790 - 4 Cœurs - 8 Thread: 3.60 Ghz.
Ram: 32 GB.
Disque: C: SDD 250 GB, D: 3 TB.
Vidéo: NVIDIA GeForce GTX 960: 2 GB DDR5.
Écran: Asus VX248 24 Pouces: 1920 x 1080.
Système: Windows 7 64 Bits.

PureBasic: 5.60 x64 Bits.
Avatar de l’utilisateur
Micoute
Messages : 2585
Inscription : dim. 02/oct./2011 16:17
Localisation : 35520 La Mézière

Re: Question JSON

Message par Micoute »

Bonjour Shadow,

les résultats sont bons, mais je pense que pour qu'ils soient utiles, il t'aurait était utile d'utiliser une structure, avec une liste, une map ou un tableau structuré.
Microsoft Windows 10 Famille 64 bits : Carte mère : ASRock 970 Extreme3 R2.0 : Carte Graphique NVIDIA GeForce RTX 3080 : Processeur AMD FX 6300 6 cœurs 12 threads 3,50 GHz PB 6.20 LTS (x64)
Un homme doit être poli, mais il doit aussi être libre !
Shadow
Messages : 1413
Inscription : mer. 04/nov./2015 17:39

Re: Question JSON

Message par Shadow »

Micoute ici le but c'est d'apprendre comment ça fonctionne, donc chaque chose en sont temps :)
Processeur: Intel Core I7-4790 - 4 Cœurs - 8 Thread: 3.60 Ghz.
Ram: 32 GB.
Disque: C: SDD 250 GB, D: 3 TB.
Vidéo: NVIDIA GeForce GTX 960: 2 GB DDR5.
Écran: Asus VX248 24 Pouces: 1920 x 1080.
Système: Windows 7 64 Bits.

PureBasic: 5.60 x64 Bits.
Avatar de l’utilisateur
Micoute
Messages : 2585
Inscription : dim. 02/oct./2011 16:17
Localisation : 35520 La Mézière

Re: Question JSON

Message par Micoute »

Je suis d'accord, c'est pourquoi je te donne des recommandations.
Microsoft Windows 10 Famille 64 bits : Carte mère : ASRock 970 Extreme3 R2.0 : Carte Graphique NVIDIA GeForce RTX 3080 : Processeur AMD FX 6300 6 cœurs 12 threads 3,50 GHz PB 6.20 LTS (x64)
Un homme doit être poli, mais il doit aussi être libre !
Shadow
Messages : 1413
Inscription : mer. 04/nov./2015 17:39

Re: Question JSON

Message par Shadow »

Voici un Tuto en Image de comment marche un Json, si j'ai bien tous compris évidement :mrgreen:
https://drive.google.com/open?id=1j7QL- ... rJC5x36Ab7
Processeur: Intel Core I7-4790 - 4 Cœurs - 8 Thread: 3.60 Ghz.
Ram: 32 GB.
Disque: C: SDD 250 GB, D: 3 TB.
Vidéo: NVIDIA GeForce GTX 960: 2 GB DDR5.
Écran: Asus VX248 24 Pouces: 1920 x 1080.
Système: Windows 7 64 Bits.

PureBasic: 5.60 x64 Bits.
Avatar de l’utilisateur
Micoute
Messages : 2585
Inscription : dim. 02/oct./2011 16:17
Localisation : 35520 La Mézière

Re: Question JSON

Message par Micoute »

C'est tout à fait ça, bravo Shadow.
Microsoft Windows 10 Famille 64 bits : Carte mère : ASRock 970 Extreme3 R2.0 : Carte Graphique NVIDIA GeForce RTX 3080 : Processeur AMD FX 6300 6 cœurs 12 threads 3,50 GHz PB 6.20 LTS (x64)
Un homme doit être poli, mais il doit aussi être libre !
Shadow
Messages : 1413
Inscription : mer. 04/nov./2015 17:39

Re: Question JSON

Message par Shadow »

Merci Micoute ;)

Je réfléchie à quelque chose actuellement...
A un système style chemin à la windows...

Genre:

Racine\DossierA\DossierB\ >>>

123
"Abc"
[123, 456, 789, "Abc", "Def", 963, "Ghi", 852]
*DossierC

En gros tu entre un chemin avec des \
puis tu as tous ce que ce chemin contient, valeur, chaîne, Tableau, arborescence...

Je sais pas du tout si je suis bien clair là :?
Faut que je vois comment mettre ça en place et si c'est utile parce que le Json c'est bien mais bon pas simple (pas si compliqué).
Simplifier tous ça au maxi quoi...

Vous en pensez quoi vous ?
Processeur: Intel Core I7-4790 - 4 Cœurs - 8 Thread: 3.60 Ghz.
Ram: 32 GB.
Disque: C: SDD 250 GB, D: 3 TB.
Vidéo: NVIDIA GeForce GTX 960: 2 GB DDR5.
Écran: Asus VX248 24 Pouces: 1920 x 1080.
Système: Windows 7 64 Bits.

PureBasic: 5.60 x64 Bits.
Avatar de l’utilisateur
SPH
Messages : 4973
Inscription : mer. 09/nov./2005 9:53

Re: Question JSON

Message par SPH »

Shadow a écrit :Faut que je vois comment mettre ça en place et si c'est utile parce que le Json c'est bien mais bon pas simple (pas si compliqué).
Simplifier tous ça au maxi quoi...

Vous en pensez quoi vous ?
Bin, tu te contredits sans cesse : c'est simple ou c'est pas simple ??

!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Intel Core i7 4770 64 bits - GTX 650 Ti
Version de PB : 6.12LTS- 64 bits
Avatar de l’utilisateur
falsam
Messages : 7334
Inscription : dim. 22/août/2010 15:24
Localisation : IDF (Yvelines)
Contact :

Re: Question JSON

Message par falsam »

Utilise une structure récursive que tu peux sauvegarder au format JSON pour l'importer par la suite.

:arrow: https://www.purebasic.fr/french/viewtop ... 81#p204781
Configuration : Windows 11 Famille 64-bit - PB 6.20 x64 - AMD Ryzen 7 - 16 GO RAM
Vidéo NVIDIA GeForce GTX 1650 Ti - Résolution 1920x1080 - Mise à l'échelle 125%
Shadow
Messages : 1413
Inscription : mer. 04/nov./2015 17:39

Re: Question JSON

Message par Shadow »

Merci falsam ;)
Processeur: Intel Core I7-4790 - 4 Cœurs - 8 Thread: 3.60 Ghz.
Ram: 32 GB.
Disque: C: SDD 250 GB, D: 3 TB.
Vidéo: NVIDIA GeForce GTX 960: 2 GB DDR5.
Écran: Asus VX248 24 Pouces: 1920 x 1080.
Système: Windows 7 64 Bits.

PureBasic: 5.60 x64 Bits.
Shadow
Messages : 1413
Inscription : mer. 04/nov./2015 17:39

Re: Question JSON

Message par Shadow »

Salut,

Je patauge, cogite, cherche...
Je ne sais pas trop si c'est utile et ou je vais mais je trouve ça plus simple....
Comment faire ça svp ?:

Code : Tout sélectionner

MyJson.SimplyJson

Debug MyJson.SimplyJson\Get\ID
Debug MyJson.SimplyJson\Get\MemoryAdress
Debug MyJson.SimplyJson\Get\Value
Debug MyJson.SimplyJson\Get\Value\MemoryAdress
Debug MyJson.SimplyJson\Get\Value\Data
Debug MyJson.SimplyJson\Get\Value\Data\Object
Debug MyJson.SimplyJson\Get\Value\Data\Object\MemoryAdress
Debug MyJson.SimplyJson\Get\Value\Data\Object\Data
Debug MyJson.SimplyJson\Get\Value\Data\Object\Data\Member
Debug MyJson.SimplyJson\Get\Value\Data\Object\Data\Member\MemoryAdress
Debug MyJson.SimplyJson\Get\Value\Data\Object\Data\Member\Name
Debug MyJson.SimplyJson\Get\Value\Data\Object\Data\Member\Value
Debug MyJson.SimplyJson\Get\Value\Data\Object\Data\Member\Value\MemoryAdress

Debug MyJson.SimplyJson\Set\ID
Debug MyJson.SimplyJson\Set\MemoryAdress
Debug MyJson.SimplyJson\Set\Value
Debug MyJson.SimplyJson\Set\Value\MemoryAdress
Debug MyJson.SimplyJson\Set\Value\Data
Debug MyJson.SimplyJson\Set\Value\Data\Object
Debug MyJson.SimplyJson\Set\Value\Data\Object\MemoryAdress
Debug MyJson.SimplyJson\Set\Value\Data\Object\Data
Debug MyJson.SimplyJson\Set\Value\Data\Object\Data\Member
Debug MyJson.SimplyJson\Set\Value\Data\Object\Data\Member\MemoryAdress
Debug MyJson.SimplyJson\Set\Value\Data\Object\Data\Member\Name
Debug MyJson.SimplyJson\Set\Value\Data\Object\Data\Member\Value
Debug MyJson.SimplyJson\Set\Value\Data\Object\Data\Member\Value\MemoryAdress
J'ai bien tenté de faire ça mais bon pas très proban :| :

Code : Tout sélectionner

Structure Member
  
  MemoryAdress.i
  Name.s
  Value.
  
EndStructure

Structure Data
  
  MemoryAdress.i
  Object.Member
  
EndStructure

Structure Value
  
  MemoryAdress.i
  Data.Data
  
EndStructure

Structure Get
  
  ID.i
  MemoryAdress.i
  Value.Value
  
EndStructure

Structure SimplyJson
  
  Get.Get
  Set.Set
  
EndStructure
Bref, ça fume la haut lol :lol:
Processeur: Intel Core I7-4790 - 4 Cœurs - 8 Thread: 3.60 Ghz.
Ram: 32 GB.
Disque: C: SDD 250 GB, D: 3 TB.
Vidéo: NVIDIA GeForce GTX 960: 2 GB DDR5.
Écran: Asus VX248 24 Pouces: 1920 x 1080.
Système: Windows 7 64 Bits.

PureBasic: 5.60 x64 Bits.
Shadow
Messages : 1413
Inscription : mer. 04/nov./2015 17:39

Re: Question JSON

Message par Shadow »

Salut, je continue dans mes recherches, le but étang de faire un système qui utiliserais les Json
mais sous forme de Patch, beaucoup plus simple pour s'y retrouver je trouve dans les données.

Bon alors j'ai pondus ça, je continue les recherche:

Code : Tout sélectionner

; Imaginez un genre d'explorateur à la windows ou les adresses sont des Patchs vers les données que l'on souhaite.

Structure PatchData
  
  Key.s
  Value.s
  
EndStructure

Structure Patch
  
  Array Block.PatchData(9999) ; Emplacement au coeur du dossier (Patch).
  
EndStructure

Global NewMap Explorer.Patch() ; Map qui sert pour le Patch (Adresse) des données.


Explorer.Patch("Vehicules\Aérien")\Block(0)\Key = "Montgolfière"
Explorer.Patch("Vehicules\Aérien")\Block(0)\Value = "123"

Explorer.Patch("Vehicules\Aérien")\Block(1)\Key = "Dirigeable"
Explorer.Patch("Vehicules\Aérien")\Block(1)\Value = "124"

Explorer.Patch("Vehicules\Aérien")\Block(2)\Key = "DeltaPlane"
Explorer.Patch("Vehicules\Aérien")\Block(2)\Value = "125"

Explorer.Patch("Vehicules\Aérien")\Block(3)\Key = "Avion"
Explorer.Patch("Vehicules\Aérien")\Block(3)\Value = "126"

Explorer.Patch("Vehicules\Aérien")\Block(4)\Key = "Hélicopter"
Explorer.Patch("Vehicules\Aérien")\Block(4)\Value = "127"


Explorer.Patch("Vehicules\Terrestre")\Block(0)\Key = "Voiture"
Explorer.Patch("Vehicules\Terrestre")\Block(0)\Value = "128"

Explorer.Patch("Vehicules\Terrestre")\Block(1)\Key = "Moto"
Explorer.Patch("Vehicules\Terrestre")\Block(1)\Value = "129"

Explorer.Patch("Vehicules\Terrestre")\Block(2)\Key = "Vélo"
Explorer.Patch("Vehicules\Terrestre")\Block(2)\Value = "130"


Explorer.Patch("Vehicules\Maritime")\Block(0)\Key = "Zodiaque"
Explorer.Patch("Vehicules\Maritime")\Block(0)\Value = "128"

Explorer.Patch("Vehicules\Maritime")\Block(1)\Key = "Bateau"
Explorer.Patch("Vehicules\Maritime")\Block(1)\Value = "129"

Explorer.Patch("Vehicules\Maritime")\Block(2)\Key = "Péniche"
Explorer.Patch("Vehicules\Maritime")\Block(2)\Value = "130"


; Le père a un Nom, il s'appel Tome, il à 38 ans.
Explorer.Patch("Père\Nom\Tome")\Block(0)\Key = "Age"
Explorer.Patch("Père\Nom\Tome")\Block(0)\Value = "38"

; Tome a une compagne qui se nomme Marine, qui elle a un enfants qui s'appel Julien, qui lui à une compagne nommé Julie qui a 21 ans.
Explorer.Patch("Père\Compagne\Marine\Enfants\Julien\Compagne\Julie")\Block(0)\Key = "Age"
Explorer.Patch("Père\Compagne\Marine\Enfants\Julien\Compagne\Julie")\Block(0)\Value = "21"


Explorer.Patch("MyJson")\Block(0)\Key = "ID"
Explorer.Patch("MyJson")\Block(0)\Value = "1"

Explorer.Patch("MyJson")\Block(1)\Key = "MemoryAdress"
Explorer.Patch("MyJson")\Block(1)\Value = "123456"

Explorer.Patch("MyJson\Data")\Block(0)\Key = "MemoryAdress"
Explorer.Patch("MyJson\Data")\Block(0)\Value = "234567"

Explorer.Patch("MyJson\Data\Object")\Block(0)\Key = "MemoryAdress"
Explorer.Patch("MyJson\Data\Object")\Block(0)\Value = "123568"

Explorer.Patch("MyJson\Data\Object\Member")\Block(0)\Key = "MemoryAdress"
Explorer.Patch("MyJson\Data\Object\Member")\Block(0)\Value = "241352"

Explorer.Patch("MyJson\Data\Object\Member")\Block(1)\Key = "Name"
Explorer.Patch("MyJson\Data\Object\Member")\Block(1)\Value = "Member 1"

Explorer.Patch("MyJson\Data\Object\Member\Value")\Block(0)\Key = "MemoryAdress"
Explorer.Patch("MyJson\Data\Object\Member\Value")\Block(0)\Value = "315246"

Explorer.Patch("MyJson\Data\Object\Member\Value")\Block(1)\Key = "Data"
Explorer.Patch("MyJson\Data\Object\Member\Value")\Block(1)\Value = "123 Abc"

ForEach Explorer.Patch()
  
  For Index = 0 To ArraySize(Explorer.Patch(MapKey(Explorer.Patch()))\Block())
    If Explorer.Patch(MapKey(Explorer.Patch()))\Block(Index)\Key > ""
      Debug "Patch: " + Chr(34) + MapKey(Explorer.Patch()) + Chr(34) + ", Key: " + Chr(34) + Explorer.Patch(MapKey(Explorer.Patch()))\Block(Index)\Key + Chr(34) + ", Value = " + Chr(34) + Explorer.Patch(MapKey(Explorer.Patch()))\Block(Index)\Value + Chr(34)
    EndIf
  Next
  
Next
Processeur: Intel Core I7-4790 - 4 Cœurs - 8 Thread: 3.60 Ghz.
Ram: 32 GB.
Disque: C: SDD 250 GB, D: 3 TB.
Vidéo: NVIDIA GeForce GTX 960: 2 GB DDR5.
Écran: Asus VX248 24 Pouces: 1920 x 1080.
Système: Windows 7 64 Bits.

PureBasic: 5.60 x64 Bits.
Avatar de l’utilisateur
Naheulf
Messages : 193
Inscription : dim. 10/mars/2013 22:22
Localisation : France

Re: Question JSON

Message par Naheulf »

Heuu.... Alors là tu m'as perdu ! J'attends de voir un exemple plus concret par-ce que là, pour moi, c'est un peu le flou artistique :lol:
Shadow
Messages : 1413
Inscription : mer. 04/nov./2015 17:39

Re: Question JSON

Message par Shadow »

Naheulf a écrit :Heuu.... Alors là tu m'as perdu ! J'attends de voir un exemple plus concret par-ce que là, pour moi, c'est un peu le flou artistique :lol:
Ouais je sais je patauge un peu, mais c'est pas plus mal lol.
Processeur: Intel Core I7-4790 - 4 Cœurs - 8 Thread: 3.60 Ghz.
Ram: 32 GB.
Disque: C: SDD 250 GB, D: 3 TB.
Vidéo: NVIDIA GeForce GTX 960: 2 GB DDR5.
Écran: Asus VX248 24 Pouces: 1920 x 1080.
Système: Windows 7 64 Bits.

PureBasic: 5.60 x64 Bits.
Shadow
Messages : 1413
Inscription : mer. 04/nov./2015 17:39

Re: Question JSON

Message par Shadow »

Encore plus simple ainsi:

Code : Tout sélectionner

Structure PatchData
  Value.s
EndStructure

Structure Patch
  Map Member.PatchData() ; Emplacement avec une clef au coeur du dossier (Patch).
EndStructure

Global NewMap SimplyJson.Patch() ; Map qui sert pour le Patch (Adresse) des données.


SimplyJson.Patch("Vehicules\Aérien")\Member("Montgolfière")\Value = "123"
SimplyJson.Patch("Vehicules\Aérien")\Member("Dirigeable")\Value = "124"
SimplyJson.Patch("Vehicules\Aérien")\Member("DeltaPlane")\Value = "125"
SimplyJson.Patch("Vehicules\Aérien")\Member("Avion")\Value = "126"
SimplyJson.Patch("Vehicules\Aérien")\Member("Hélicopter")\Value = "127"

SimplyJson.Patch("Vehicules\Terrestre")\Member("Voiture")\Value = "128"
SimplyJson.Patch("Vehicules\Terrestre")\Member("Moto")\Value = "129"
SimplyJson.Patch("Vehicules\Terrestre")\Member("Vélo")\Value = "130"

SimplyJson.Patch("Vehicules\Maritime")\Member("Zodiaque")\Value = "128"
SimplyJson.Patch("Vehicules\Maritime")\Member("Bateau")\Value = "129"
SimplyJson.Patch("Vehicules\Maritime")\Member("Péniche")\Value = "130"


; Le père a un Nom, il s'appel Tome, il à 38 ans.
SimplyJson.Patch("Père\Nom\Tome")\Member("Age")\Value = "38"

; Tome a une compagne qui se nomme Marine, qui elle a un enfants qui s'appel Julien, qui lui à une compagne nommé Julie qui a 21 ans.
SimplyJson.Patch("Père\Compagne\Marine\Enfants\Julien\Compagne\Julie")\Member("Age")\Value = "21"


SimplyJson.Patch("MyJson")\Member("ID")\Value = "1"
SimplyJson.Patch("MyJson")\Member("MemoryAdress")\Value = "123456"
SimplyJson.Patch("MyJson\Data")\Member("MemoryAdress")\Value = "234567"
SimplyJson.Patch("MyJson\Data\Object")\Member("MemoryAdress")\Value = "123568"
SimplyJson.Patch("MyJson\Data\Object\Member")\Member("MemoryAdress")\Value = "241352"
SimplyJson.Patch("MyJson\Data\Object\Member")\Member("Name")\Value = "Member 1"
SimplyJson.Patch("MyJson\Data\Object\Member\Value")\Member("MemoryAdress")\Value = "315246"
SimplyJson.Patch("MyJson\Data\Object\Member\Value")\Member("Data")\Value = "123 Abc"

ForEach SimplyJson.Patch()
  
  ForEach SimplyJson.Patch(MapKey(SimplyJson.Patch()))\Member()
    Debug "Patch: " + Chr(34) + MapKey(SimplyJson.Patch()) + Chr(34) + ", Member Name: " + Chr(34) + MapKey(SimplyJson.Patch(MapKey(SimplyJson.Patch()))\Member()) + Chr(34) + ", Value = " + Chr(34) + SimplyJson.Patch(MapKey(SimplyJson.Patch()))\Member()\Value + Chr(34)
  Next
  
Next

Le Json c'est la mouise à utiliser, ya des tonnes d'adresses mémoire à gérer, c'est vraiment le bordel !
Alors je cherche à faire plus simple, rendre l'utilisation d'un Json plus simplement comme ici (pas fini)
Tu vois, sous forme de Path (Adresse), c'est beaucoup plus simple à appréhender et comprendre.
Processeur: Intel Core I7-4790 - 4 Cœurs - 8 Thread: 3.60 Ghz.
Ram: 32 GB.
Disque: C: SDD 250 GB, D: 3 TB.
Vidéo: NVIDIA GeForce GTX 960: 2 GB DDR5.
Écran: Asus VX248 24 Pouces: 1920 x 1080.
Système: Windows 7 64 Bits.

PureBasic: 5.60 x64 Bits.
Répondre