Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Read Json data from the command prompt

Discussion in 'Editor & General Support' started by fsok, May 11, 2017.

  1. fsok


    Apr 11, 2017
    Hi !

    I have a server script write in javascript that use

    Code (JavaScript):
    1. ioPy.sockets.on('connection', function (socket) {
    2.     socket.on('data_available', function(parameter, data, callback) {
    3.         console.log(data);
    4.         var jsonData = JSON.stringify(data);
    5.         console.log(jsonData);
    6.         if(DEBUG) { console.log(parameter); }
    7.         io.emit(parameter, jsonData);
    8.     });
    9. });
    That script send json data to the command prompt.

    And I would like to know how can I read this json data from the command prompt in my unity poject by a c# script ? For example display it in the console.

    I already use Litjson, asset (which is deprecated)...

    Thank you !