jsonconvert

Newtonsoft.Json works in Unity Editor but not on mobile devices

怎甘沉沦 提交于 2021-01-05 14:47:15
问题 I am programming a game of questions and answers by categories in Unity. The categories are obtained through a PHP script that returns a JSON text, * when I use this solution in the UnityEditor it works correctly, but when I install the .apk on my mobile device, deserialization does not work* . The connection to the mysql database and the PHP scripts work correctly because before I log in and it works fine string json = [ { "id_cat":"1", "nombre_cat":"DAM", "id_cat_padre":"0" }, { "id_cat":"4

Newtonsoft.Json works in Unity Editor but not on mobile devices

人盡茶涼 提交于 2021-01-05 14:46:09
问题 I am programming a game of questions and answers by categories in Unity. The categories are obtained through a PHP script that returns a JSON text, * when I use this solution in the UnityEditor it works correctly, but when I install the .apk on my mobile device, deserialization does not work* . The connection to the mysql database and the PHP scripts work correctly because before I log in and it works fine string json = [ { "id_cat":"1", "nombre_cat":"DAM", "id_cat_padre":"0" }, { "id_cat":"4

Newtonsoft.Json works in Unity Editor but not on mobile devices

醉酒当歌 提交于 2021-01-05 14:45:00
问题 I am programming a game of questions and answers by categories in Unity. The categories are obtained through a PHP script that returns a JSON text, * when I use this solution in the UnityEditor it works correctly, but when I install the .apk on my mobile device, deserialization does not work* . The connection to the mysql database and the PHP scripts work correctly because before I log in and it works fine string json = [ { "id_cat":"1", "nombre_cat":"DAM", "id_cat_padre":"0" }, { "id_cat":"4

remove null array field from dataframe while converting it to JSON

▼魔方 西西 提交于 2020-06-09 05:29:26
问题 Is there any method where i can create a json from a spark dataframe by not using those fields which are null: Lets suppose i have a data frame: +-------+----------------+ | name| hit_songs| +-------+----------------+ |beatles|[help, hey jude]| | romeo| [eres mia]| | juliet| null | +-------+----------------+ i want to convert it into a json like: [{ name: "beatles", hit_songs: [help, hey jude] }, { name: "romeo", hit_songs: [eres mia] }, { name: "juliet" } ] i dont want the field hit_songs in

remove null array field from dataframe while converting it to JSON

落花浮王杯 提交于 2020-06-09 05:28:06
问题 Is there any method where i can create a json from a spark dataframe by not using those fields which are null: Lets suppose i have a data frame: +-------+----------------+ | name| hit_songs| +-------+----------------+ |beatles|[help, hey jude]| | romeo| [eres mia]| | juliet| null | +-------+----------------+ i want to convert it into a json like: [{ name: "beatles", hit_songs: [help, hey jude] }, { name: "romeo", hit_songs: [eres mia] }, { name: "juliet" } ] i dont want the field hit_songs in

How to prevent “Date & Time” conversion while converting a json string to XML doc

梦想的初衷 提交于 2020-01-30 09:32:11
问题 I want to convert a JSON response to an equivalent XML document but while doing so, I also want to preserve current date and time format along with the offset e.g., DateTime in JSON is "2019-10-25T07:00:00-05:00" and after conversion I want it to remain the same. But after conversion into XML, the DateTime value becomes "2019-10-25T08:00:00-04:00" I tried to search about it in Microsoft docs but I didn't find my answer for the following questions: How to determine the time zone of a given

C# - OutOfMemoryException saving a List on a JSON file

筅森魡賤 提交于 2019-12-23 22:19:40
问题 I'm trying to save the streaming data of a pressure map. Basically I have a pressure matrix defined as: double[,] pressureMatrix = new double[e.Data.GetLength(0), e.Data.GetLength(1)]; Basically, I'm getting one of this pressureMatrix every 10 milliseconds and I want to save all the information in a JSON file to be able to reproduce it later. What I do is, first of all, write what I call the header with all the settings used to do the recording like this: recordedData.softwareVersion =