예제 #1
0
        private string JSONtoString(snapJSON dsJS)
        {
            StringBuilder result = new StringBuilder();

            result.AppendFormat("Location: (x:{0}, y:{1}, z:{2})\r\n", dsJS.loc.x, dsJS.loc.y, dsJS.loc.z);
            result.AppendFormat("Area: {0}\r\n", dsJS.area);
            result.AppendFormat("Street: {0}\r\n", dsJS.street);
            result.AppendFormat("nm: {0}\r\n", dsJS.nm);
            result.AppendFormat("rds: {0}\r\n", dsJS.rds);
            result.AppendFormat("scr: {0}\r\n", dsJS.scr);
            result.AppendFormat("sid: {0}\r\n", dsJS.sid);
            result.AppendFormat("Crew ID: {0}\r\n", dsJS.crewid);
            result.AppendFormat("mid: {0}\r\n", dsJS.mid);
            result.AppendFormat("Game mode: {0}\r\n", (dsJS.mode == "SP" ? "Single player" : "Online"));
            result.AppendFormat("Meme: {0}\r\n", (dsJS.meme ? "Yes" : "No"));
            result.AppendFormat("Mug shot: {0}\r\n", (dsJS.mug ? "Yes" : "No"));
            result.AppendFormat("uid: {0}\r\n", dsJS.uid);
            DateTime gameTime = new DateTime(dsJS.time.year, dsJS.time.month, dsJS.time.day, dsJS.time.hour, dsJS.time.minute, dsJS.time.second);

            result.AppendFormat("Game time: {0}\r\n", gameTime);
            DateTime creatTime = UnixTimeStampToDateTime(dsJS.creat);

            result.AppendFormat("Created time: {0}\r\n", creatTime);
            result.AppendFormat("Selfie: {0}\r\n", (dsJS.slf ? "Yes" : "No"));
            result.AppendFormat("Director mode: {0}\r\n", (dsJS.drctr ? "Yes" : "No"));

            return(result.ToString());
        }
예제 #2
0
        private string JSONtoString(snapJSON dsJS)
        {
            StringBuilder result = new StringBuilder();

            result.AppendFormat("Location: (x:{0}, y:{1}, z:{2})\r\n", dsJS.loc.x, dsJS.loc.y, dsJS.loc.z);
            result.AppendFormat("Area: {0}\r\n", dsJS.area);
            result.AppendFormat("Street: {0}\r\n", dsJS.street);
            result.AppendFormat("nm: {0}\r\n", dsJS.nm);
            result.AppendFormat("rds: {0}\r\n", dsJS.rds);
            result.AppendFormat("scr: {0}\r\n", dsJS.scr);
            result.AppendFormat("sid: {0}\r\n", dsJS.sid);
            result.AppendFormat("Crew ID: {0}\r\n", dsJS.crewid);
            result.AppendFormat("mid: {0}\r\n", dsJS.mid);
            result.AppendFormat("Game mode: {0}\r\n", (dsJS.mode == "SP" ? "Single player" : "Online"));
            result.AppendFormat("Meme: {0}\r\n", (dsJS.meme ? "Yes" : "No"));
            result.AppendFormat("Mug shot: {0}\r\n", (dsJS.mug ? "Yes" : "No"));
            result.AppendFormat("uid: {0}\r\n", dsJS.uid);
            DateTime gameTime = new DateTime(dsJS.time.year, dsJS.time.month, dsJS.time.day, dsJS.time.hour, dsJS.time.minute, dsJS.time.second);
            result.AppendFormat("Game time: {0}\r\n", gameTime);
            DateTime creatTime = UnixTimeStampToDateTime(dsJS.creat);
            result.AppendFormat("Created time: {0}\r\n", creatTime);
            result.AppendFormat("Selfie: {0}\r\n", (dsJS.slf ? "Yes" : "No"));
            result.AppendFormat("Director mode: {0}\r\n", (dsJS.drctr ? "Yes" : "No"));

            return result.ToString();
        }