Questions tagged [litjson]

LitJSON is a small and fast library for handling data in the JSON format. It is written in C# and is compatible with all .Net languages.

LitJSON is a small and fast library for handling data in the JSON format. It is written in C# and is compatible with all .Net languages.

37 questions
5
votes
4 answers

Using LitJson in unity3d

2 questions. 1) Is it possible to use the LitJson library as is while scripting in Javascript? This is really a general question about being able to use c# source in javascript source. 2) I'm new to c# dev. I can't seem to get LitJson up and…
greggreg
  • 11,945
  • 6
  • 37
  • 52
3
votes
2 answers

Serialize response with switch on generic type

I'm using LitJson and BestHTTP libraries on a Unity3D project and I would write my custom ResponseSerializer object. The goal is create a method that uses generics to map the possible response into my wanted object. So, my first attempt was…
3
votes
1 answer

Resharper thinks that typecast is redundant, but without typecast the code does not work

Iterating JsonData through foreach fetches IDictionary enumerator instead of IList one. foreach (var jsonEntry in jsonData) This causes my code to throw an error. InvalidOperationException: Instance of JsonData is not a…
jellyfication
  • 1,595
  • 1
  • 16
  • 37
3
votes
3 answers

How to get a UTF-8 JSON

I'm using LitJSON library but things gets a little bit odd. Do you know any JSON library that keeps the accents when converting ? Here's the test…
MedianP
  • 33
  • 1
  • 1
  • 4
3
votes
3 answers

LitJSON Library for format FLOAT / DOUBLE issue

since JSON ist a format that can be written as string it has to be interpreted by an library or sometimes native by the language itself. In the older versions of C# there is nothing like that. Using the library LitJSON I have the following problem I…
marius
  • 1,118
  • 1
  • 18
  • 38
3
votes
1 answer

how to parse json array using Litjson?

I am developing an application in which i am using data came from server in the json format. However i am able to parse normal json data but failed to parse the json data with arrays, the json response is given below, [{"id_user":"80","services": …
dd619
  • 5,910
  • 8
  • 35
  • 60
2
votes
2 answers

How can I read the boolean value from litjson

My json file from server is like…
Mark2
  • 49
  • 7
1
vote
1 answer

SQLCLR Assembly Much Faster When Unloaded

I have a SQLCLR assembly that does a simple JSON deserialization using the LitJson package on a SQL Azure Managed Instance. This CLR is called from a table-valued function that just returns the JSON properties as a table (in theory faster than the…
Jon
  • 91
  • 1
  • 7
1
vote
1 answer

Deserialize JSON object array in C# using LitJson

I'm limited by Unity3d 3 new security measures to using LitJson for Web Player application, otherwise it won't compile. Is there a simple way to serialize this output as an object (contents of…
Serge N.
  • 13
  • 1
  • 4
1
vote
1 answer

JSON parsing using c# and LitJson

I have a JSON data (file attached). How can I parse it using C# using LitJSON? I am having trouble in deserialising it. Any help would be appreciated. { "vr-sessions" : { "-KvDNAFD_BxlKEJ958eX" : { "interview" : "Android", "questions" : { …
1
vote
1 answer

How do I extract UTF-8 strings out of a JSON file using LitJSON, as JsonData does not seem to convert?

I've tried many methods to extract some strings out of a JSON file using LitJson in Unity. I've encoding converts all over, tried getting byte arrays and sending them around and nothing seems to work. I went to the very start of where I create the…
Voidjumper
  • 13
  • 1
  • 5
1
vote
1 answer

JSON file works on Unity Editor but not on Android device

Currently using LitJson in my development. Json is working perfectly fine in Unity Editor but not in android device. Tried various ways in loading the json file but nothing worked. Here is my latest code: string path = Application.persistentDataPath…
Sarah
  • 135
  • 3
  • 19
1
vote
1 answer

LitJson through exception on centos using mono

I compiled mono source code(using ./configure, make, make install) for centos and seems it's ok. mono --version Mono JIT compiler version 2.10.9 (tarball 2013年 01月 02日 星期三 13:43:05 CST) Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and…
Bowie Xu
  • 11
  • 3
1
vote
2 answers

In C#, how do you get the name of an indexed property if you only have it's index number?

I have an object created by a json mapper function (using LitJson). It contains indexed properties. I can iterate through the properties and get each property value like this for(int i = 0; i < jdata.Count;i++) { Console.WriteLine(jdata[i]); }…
Spacecliff
  • 13
  • 4
0
votes
1 answer

How to deserialize two-dimensional array json

I have a two-dimensional array json [ [{"x":35.77778,"y":206.8565,"z":0},{"x":80.5,"y":206.8565,"z":0}], [{"x":35.77778,"y":206.8565,"z":0},{"x":80.5,"y":206.8565,"z":0}] ] I have a C# class public class Position { public float x {…
hellozjf
  • 169
  • 5
  • 16
1
2 3