How to process .Json data in kibana

Hi, when i try to process .Json data via kibana:

my json file:

{
  "classe": "XXX.XXXX.XXXXXXX.XXXX.XXXXXX.XXXXXXXX",
  "object_pk": "XX",
  "datetime": "XXXX-XX-XXTXX:XX:XX.XXX",
  "jsonContent": {
    "rcp": "",
    "creation": 6354635765254,
    "examensComplementaires": "",
    "modification": 4657524575,
    "patient": {
      "temporaire": false,
      "ipp": "XXXXXXX",
      "adresse": "XXXXXXXXXXX",
      "caisselibelle": "XXXXXXX",
      "caissenum": "XXXXXXXX",
      "ville": "XXXXXXXXX",
      "infobe": "",
      "naissanceVille": "XXXXXXXXXXX",
      "prenom": "XX",
      "mutuelle": "X X",
      "photoFileName": "",
      "nomUsuel": "X",
      "age": "X ans ",
      "medtraitantprenom": "X X",
      "naissanceDate": 4545454545454,
      "decesDate": null,
      "numss": "XX",
      "nomNaissance": "XX",
      "medtraitantnom": "XX",
      "nomComplet": "XX (née XX) XX XX",
      "administratif": {
        "situationFamilliale": "",
        "mail": "",
        "correspondants": [],
        "personneAPrevenir": "",
        "profession": "",
        "telPro": "",
        "personneConfiance": "",
        "telPortable": "",
        "situationFamillialeSexuee": "",
        "mesureProtectionComplement": "",
        "id": 4545454,
        "miseAJour": 454545454,
        "modeDeVie": "",
        "mesureProtection": "",
        "pk": 4545454,
        "autreInfo": ""
      },
      "medtraitantville": "X  X",
      "email": "",
      "codePostal": "X",
      "naissanceCodePostal": "X",
      "insc": "X X",
      "sexe": "F",
      "epk": "X==",
      "telephone": "XX XX XX XX XX",
      "pk": "X"
    },
    "historiqueMaladie": "",
    "auteur": {
      "groupes": [
        {
          "ordreTransmission": "X",
          "enteteMail": "",
          "imprimante": "X",
          "libelleCourt": "X",
          "libelle": "X X X X",
          "test": false,
          "accesSynthese": true,
          "planDeSoinsFin": 998989898,
          "id": 5454545454,
          "dim": false,
          "delaiAccesTransmissionFutur": 454545454,
          "planDeSoinsDepart": 545454,
          "modeDegrade": false,
          "modificationObservationAuteurUniquement": false,
          "autoriseDelegation": false,
          "mailExpediteur": "truc_machin@machin.truc",
          "feuilleDePoche": false,
          "site": "XXX",
          "delaiModificationObservation": 545454,
          "adresseMailScanner": "truc_machin@machin.truc",
          "dureeDeVieDesDocuments": 5454,
          "codeModeleIteration": "XX",
          "imprimanteDeSecours": "X",
          "codeModeleSynthese": "X",
          "accesDocumentsConfidentiels": false,
          "accesAgenda": true,
          "accesPrescription": false,
          "agendasMultiplesPourConsultant": false,
          "bloc": false,
          "codeModeleObservation": "X",
          "pk": 454545454
        }
      ],
      "nomCompletFormate": "XX XX XX",
      "nomCompletAbrege": "XXXX",
      "rpps": "",
      "nom": "X",
      "nomComplet": "X X",
      "prenom": "X",
      "derniereConnexionAdresseIP": "XX.XX.XX.XX",
      "groupeParDefaut": {
        "delaiAccesTransmissionFutur": 4545454,
        "planDeSoinsDepart": -1,
        "modeDegrade": false,
        "modificationObservationAuteurUniquement": false,
        "autoriseDelegation": false,
        "mailExpediteur": "truc_machin@machin.truc",
        "feuilleDePoche": false,
        "site": "AVR",
        "delaiModificationObservation": 0,
        "adresseMailScanner": "truc_machin@machin.truc",
        "dureeDeVieDesDocuments": 30,
        "pk": 4654654654
      },
      "derniereConnexionDate": 54654654654,
      "role": {
        "id": 545445,
        "libelleCourt": "XX",
        "libelle": "XX",
        "metier": "XX",
        "pk": 546546
      },
      "civilite": "XX",
      "purgeGroupeEffectuee": false,
      "matricule": "XXXXXXX",
      "pk": "XXXXXXXX"
    },
    "pk": 54687654
  }
}

and I have this error:

and this in the discover tab

By the way my range time is from the first of january to today so guess it's enough.

The weird part is, when i try with this json file:

Take the twitter.json file !

it works.

And i try with the code on one ligne fashion but this error popout:

Kibana4

So if you have any answer...

Have a nice day.

Hey @busan,

I believe this uploader expects "NDJSON" as opposed to JSON files. The "ND" stands for newline-delimited. So essentially, you have to remove the formatting from your JSON objects, so that each object you want to index is on its own line, and doesn't span multiple lines.

First, thank you for your answer.
So i need to convert my Json file into NDJSON file ?
That's it ?

Yep, try reformatting your json file so that each object is on a single line. See https://github.com/ndjson/ndjson-spec for examples and the spec.

Ok, i got it
It work perfectly thank you.
The solution was to put other line in my file, like this:

{"object_pk":"XX","datetime":"XXXX-XX-XXTXX:XX:XX.XXX","jsonContent":{"rcp":"-","creation":6354635765254,"examensComplementaires":"","modification":4657524575,"patient":{"temporaire":false,"ipp":"XXXXXXX","adresse":"XXXXXXXXXXX","caisselibelle":"XXXXXXX","caissenum":"XXXXXXXX","ville":"XXXXXXXXX","infobe":"","naissanceVille":"XXXXXXXXXXX","prenom":"XX","mutuelle":"X X","photoFileName":"","nomUsuel":"X","age":"X ans ","medtraitantprenom":"X X","naissanceDate":4545454545454,"decesDate":null,"numss":"XX","nomNaissance":"XX","medtraitantnom":"XX","nomComplet":"XX (née XX) XX XX","administratif":{"situationFamilliale":"","mail":"","correspondants":[],"personneAPrevenir":"","profession":"","telPro":"","personneConfiance":"","telPortable":"","situationFamillialeSexuee":"","mesureProtectionComplement":"","id":4545454,"miseAJour":454545454,"modeDeVie":"","mesureProtection":"","pk":4545454,"autreInfo":""},"medtraitantville":"X  X","email":"","codePostal":"X","naissanceCodePostal":"X","insc":"X X","sexe":"F","epk":"X==","telephone":"XX XX XX XX XX","pk":"X"},"historiqueMaladie":"","auteur":{"groupes":[{"ordreTransmission":"X","enteteMail":"","imprimante":"X","libelleCourt":"X","libelle":"X X X X","test":false,"accesSynthese":true,"planDeSoinsFin":998989898,"id":578798787,"dim":false,"delaiAccesTransmissionFutur":454545454,"planDeSoinsDepart":545454,"modeDegrade":false,"modificationObservationAuteurUniquement":false,"autoriseDelegation":false,"mailExpediteur":"truc_machin@machin.truc","feuilleDePoche":false,"site":"XXX","delaiModificationObservation":545454,"adresseMailScanner":"truc_machin@machin.truc","dureeDeVieDesDocuments":5454,"codeModeleIteration":"XX","imprimanteDeSecours":"X","codeModeleSynthese":"X","accesDocumentsConfidentiels":false,"accesAgenda":true,"accesPrescription":false,"agendasMultiplesPourConsultant":false,"bloc":false,"codeModeleObservation":"X","pk":454545454}],"nomCompletFormate":"XX XX XX","nomCompletAbrege":"XXXX","rpps":"","nom":"X","nomComplet":"X X","prenom":"X","derniereConnexionAdresseIP":"XX.XX.XX.XX","groupeParDefaut":{"delaiAccesTransmissionFutur":4545454,"planDeSoinsDepart":-1,"modeDegrade":false,"modificationObservationAuteurUniquement":false,"autoriseDelegation":false,"mailExpediteur":"truc_machin@machin.truc","feuilleDePoche":false,"site":"AVR","delaiModificationObservation":0,"adresseMailScanner":"truc_machin@machin.truc","dureeDeVieDesDocuments":30,"pk":4654654654},"derniereConnexionDate":54654654654,"role":{"id":545445,"libelleCourt":"XX","libelle":"XX","metier":"XX","pk":546546},"civilite":"XX","purgeGroupeEffectuee":false,"matricule":"XXXXXXX","pk":"XXXXXXXX"},"pk":54687654}},
{"object_pk":"XX","datetime":"XXXX-XX-XXTXX:XX:XX.XXX","jsonContent":{"rcp":"-","creation":6354635765254,"examensComplementaires":"","modification":4657524575,"patient":{"temporaire":false,"ipp":"XXXXXXX","adresse":"XXXXXXXXXXX","caisselibelle":"XXXXXXX","caissenum":"XXXXXXXX","ville":"XXXXXXXXX","infobe":"","naissanceVille":"XXXXXXXXXXX","prenom":"XX","mutuelle":"X X","photoFileName":"","nomUsuel":"X","age":"X ans ","medtraitantprenom":"X X","naissanceDate":4545454545454,"decesDate":null,"numss":"XX","nomNaissance":"XX","medtraitantnom":"XX","nomComplet":"XX (née XX) XX XX","administratif":{"situationFamilliale":"","mail":"","correspondants":[],"personneAPrevenir":"","profession":"","telPro":"","personneConfiance":"","telPortable":"","situationFamillialeSexuee":"","mesureProtectionComplement":"","id":4545454,"miseAJour":454545454,"modeDeVie":"","mesureProtection":"","pk":4545454,"autreInfo":""},"medtraitantville":"X  X","email":"","codePostal":"X","naissanceCodePostal":"X","insc":"X X","sexe":"F","epk":"X==","telephone":"XX XX XX XX XX","pk":"X"},"historiqueMaladie":"","auteur":{"groupes":[{"ordreTransmission":"X","enteteMail":"","imprimante":"X","libelleCourt":"X","libelle":"X X X X","test":false,"accesSynthese":true,"planDeSoinsFin":998989898,"id":578798787,"dim":false,"delaiAccesTransmissionFutur":454545454,"planDeSoinsDepart":545454,"modeDegrade":false,"modificationObservationAuteurUniquement":false,"autoriseDelegation":false,"mailExpediteur":"truc_machin@machin.truc","feuilleDePoche":false,"site":"XXX","delaiModificationObservation":545454,"adresseMailScanner":"truc_machin@machin.truc","dureeDeVieDesDocuments":5454,"codeModeleIteration":"XX","imprimanteDeSecours":"X","codeModeleSynthese":"X","accesDocumentsConfidentiels":false,"accesAgenda":true,"accesPrescription":false,"agendasMultiplesPourConsultant":false,"bloc":false,"codeModeleObservation":"X","pk":454545454}],"nomCompletFormate":"XX XX XX","nomCompletAbrege":"XXXX","rpps":"","nom":"X","nomComplet":"X X","prenom":"X","derniereConnexionAdresseIP":"XX.XX.XX.XX","groupeParDefaut":{"delaiAccesTransmissionFutur":4545454,"planDeSoinsDepart":-1,"modeDegrade":false,"modificationObservationAuteurUniquement":false,"autoriseDelegation":false,"mailExpediteur":"truc_machin@machin.truc","feuilleDePoche":false,"site":"AVR","delaiModificationObservation":0,"adresseMailScanner":"truc_machin@machin.truc","dureeDeVieDesDocuments":30,"pk":4654654654},"derniereConnexionDate":54654654654,"role":{"id":545445,"libelleCourt":"XX","libelle":"XX","metier":"XX","pk":546546},"civilite":"XX","purgeGroupeEffectuee":false,"matricule":"XXXXXXX","pk":"XXXXXXXX"},"pk":54687654}}

Thank you and have a nice day

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.