使用json字符串将数据从java发送到php不起作用

I have in my java application some data that I want to send them to php using json to insert them later in database. the problem is with the json string.

Main.java

String args = "{\"nom\":\""+hostName+"\",\"host_name\":\""+hostName+"\", \"os_name\":\""+nameOS+"\",\"os_type\":\""+osType+"\",\"os_version\":\""+osVersion+"\"}";
Cpu.main(args);

Cpu.java

package webservice;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;

public class Cpu {

    public static void main(String args) {

        try {
            // make json string, try also hamburger

            // send as http get request
            URL url = new URL("http://localhost:8080/parc/index.php?order=" + args);
            URLConnection conn = url.openConnection();

            // Get the response
            BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
            String line;
            while ((line = rd.readLine()) != null) {
                System.out.println(line);
            }
            rd.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

PHPFILE.php

    <?php
$order = $_GET["order"];
$obj = json_decode($order);
$nom = $obj->{"nom"};
$host_name = $obj->{"host_name"};
$os_name = $obj->{"os_name"};
$os_type = $obj->{"os_type"};
$os_version = $obj->{"os_version"};
                echo $host_name;
            echo json_last_error(); // 4 (JSON_ERROR_SYNTAX)
echo json_last_error_msg(); // unexpected character 
$array = array("nom" => $nom, "host_name" => $host_name, "os_name" => $os_name, "os_type" => $os_type, "os_version" => $os_version);
echo json_encode($array);

?>

Now I think that the problem with the json string format wich is "args" because when I change the variables hostname, os_type... like this : (String json = "{\"name\":\"Frank\",\"food\":\"pizza\",\"quantity\":3}";) (from a tutorial) it works normally.