Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Format json file (read and processing it)

Format json file (read and processing it)

Scheduled Pinned Locked Moved Visual Basic
announcementjavaapachecomgame-dev
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ammar_Ahmad
    wrote on last edited by
    #1

    I have been working on a minecraft (game) launcher and so far everything is going good. But I want it to do something more.. like install different versions. The way the official launcher does it by reading the .json file. Here is an example of one of the json file:

    {
    "id": "1.6.4",
    "time": "2013-09-19T20:52:37+05:00",
    "releaseTime": "2013-09-19T20:52:37+05:00",
    "type": "release",
    "minecraftArguments": "--username ${auth_player_name} --session ${auth_session} --version ${version_name} --gameDir ${game_directory} --assetsDir ${game_assets}",
    "libraries": [
    {
    "name": "net.sf.jopt-simple:jopt-simple:4.5"
    },
    {
    "name": "com.paulscode:codecjorbis:20101023"
    },
    {
    "name": "com.paulscode:codecwav:20101023"
    },
    {
    "name": "com.paulscode:libraryjavasound:20101123"
    },
    {
    "name": "com.paulscode:librarylwjglopenal:20100824"
    },
    {
    "name": "com.paulscode:soundsystem:20120107"
    },
    {
    "name": "argo:argo:2.25_fixed"
    },
    {
    "name": "org.bouncycastle:bcprov-jdk15on:1.47"
    },
    {
    "name": "com.google.guava:guava:14.0"
    },
    {
    "name": "org.apache.commons:commons-lang3:3.1"
    },
    {
    "name": "commons-io:commons-io:2.4"
    },
    {
    "name": "net.java.jinput:jinput:2.0.5"
    },
    {
    "name": "net.java.jutils:jutils:1.0.0"
    },
    {
    "name": "com.google.code.gson:gson:2.2.2"
    },
    {
    "name": "org.lwjgl.lwjgl:lwjgl:2.9.0",
    "rules": [
    {
    "action": "allow"
    },
    {
    "action": "disallow",
    "os": {
    "name": "osx",
    "version": "^10\\.5\\.\\d$"
    }
    }
    ]
    },
    {
    "name": "org.lwjgl.lwjgl:lwjgl_util:2.9.0",
    "rules": [
    {
    "action": "allow"
    },
    {
    "action": "disallow",
    "os": {
    "name": "osx",
    "version": "^10\\.5\\.\\d$"
    }
    }
    ]
    },
    {
    "name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.0",
    "rules": [
    {
    "action": "allow"
    },
    {
    "action": "disallow",
    "os": {
    "name": "osx",
    "version": "^10\\.5\\.\\d$"
    }
    }
    ],
    "natives": {
    "linux": "natives-linux",
    "windows": "natives-windows",
    "osx": "natives-osx"
    },
    "extract": {
    "exclude

    Richard DeemingR 1 Reply Last reply
    0
    • A Ammar_Ahmad

      I have been working on a minecraft (game) launcher and so far everything is going good. But I want it to do something more.. like install different versions. The way the official launcher does it by reading the .json file. Here is an example of one of the json file:

      {
      "id": "1.6.4",
      "time": "2013-09-19T20:52:37+05:00",
      "releaseTime": "2013-09-19T20:52:37+05:00",
      "type": "release",
      "minecraftArguments": "--username ${auth_player_name} --session ${auth_session} --version ${version_name} --gameDir ${game_directory} --assetsDir ${game_assets}",
      "libraries": [
      {
      "name": "net.sf.jopt-simple:jopt-simple:4.5"
      },
      {
      "name": "com.paulscode:codecjorbis:20101023"
      },
      {
      "name": "com.paulscode:codecwav:20101023"
      },
      {
      "name": "com.paulscode:libraryjavasound:20101123"
      },
      {
      "name": "com.paulscode:librarylwjglopenal:20100824"
      },
      {
      "name": "com.paulscode:soundsystem:20120107"
      },
      {
      "name": "argo:argo:2.25_fixed"
      },
      {
      "name": "org.bouncycastle:bcprov-jdk15on:1.47"
      },
      {
      "name": "com.google.guava:guava:14.0"
      },
      {
      "name": "org.apache.commons:commons-lang3:3.1"
      },
      {
      "name": "commons-io:commons-io:2.4"
      },
      {
      "name": "net.java.jinput:jinput:2.0.5"
      },
      {
      "name": "net.java.jutils:jutils:1.0.0"
      },
      {
      "name": "com.google.code.gson:gson:2.2.2"
      },
      {
      "name": "org.lwjgl.lwjgl:lwjgl:2.9.0",
      "rules": [
      {
      "action": "allow"
      },
      {
      "action": "disallow",
      "os": {
      "name": "osx",
      "version": "^10\\.5\\.\\d$"
      }
      }
      ]
      },
      {
      "name": "org.lwjgl.lwjgl:lwjgl_util:2.9.0",
      "rules": [
      {
      "action": "allow"
      },
      {
      "action": "disallow",
      "os": {
      "name": "osx",
      "version": "^10\\.5\\.\\d$"
      }
      }
      ]
      },
      {
      "name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.0",
      "rules": [
      {
      "action": "allow"
      },
      {
      "action": "disallow",
      "os": {
      "name": "osx",
      "version": "^10\\.5\\.\\d$"
      }
      }
      ],
      "natives": {
      "linux": "natives-linux",
      "windows": "natives-windows",
      "osx": "natives-osx"
      },
      "extract": {
      "exclude

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      For reading or writing JSON in .NET, the best place to start is the JSON.NET[^] library.


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups