Latest Questions tagged Json

Browse all latest questions tagged Json

10
Votes
Published 24 Apr, 2022
Python - Pandas DataFrame: normalize one JSON column and merge with other columns

I have a pandas DataFrame containing one column with multiple JSON data items as list of dicts. I want to normalize the JSON column and duplicate the non-JSON columns: # creating dataframe df_actions...

14
Votes
Published 07 Sep, 2022
Java - Can the JsonProperty required value be conditional?

Is it possible to have the @JsonProperty required dynamically set or set at call? The reason behind this... I'm generating json files which describes a schema and defines What are the required fiel...

64
Votes
Published 16 Sep, 2022
Java - How to upload a json file in mongodb using Java?

I am trying to upload a big JSON file(newclicklogs.json) into mongodb using Java. Here is how my JSON file looks like: {"preview":false,"result":{"search_term":"rania","request_time":"Sat Apr 01 12:4...

21
Votes
Published 16 Apr, 2022
Javascript - How to send JSON object as JSON String with Postman?

I want to send a JSON request but problem is I need to send my userPropertiesAsJsonString field as JSON string. How can I send userPropertiesAsJsonString as JSON string? { "User" : { "u...

3
Votes
Published 24 Apr, 2022
Javascript - How to pass a queryset from django to javascript function?

I want to pass a queryset from a view to a javascript function throught the template: my view.py: def myview(request): lista=Mymodel.objects.filter(tipo=mytipo) context_dict['lista']=lis...

40
Votes
Published 31 Aug, 2022
Python - Reading all json files in a directory

I have multiple (400) json files containing a dict in a directory that I want to read and append to a list. I've tried looping over all the files in the directory like this: path_to_jsonfiles = 'Trip...

72
Votes
Published 14 Sep, 2022
Java - Spark get column names of nested json

I'm trying to get column names from a nested JSON via DataFrames. The schema is given below: root |-- body: struct (nullable = true) | |-- Sw1: string (nullable = true) | |-- Sw2: string (n...

40
Votes
Published 20 Aug, 2022
Python - MySQL One-to-Many to JSON format

I have two MySQL tables: User (id, name) Sale (id, user, item) Where Sale(user) is a foreign key to User(id), so this is a one-to-many relationship (one user can make many sales). I'm trying to ge...

1095
Votes
Published 24 Apr, 2022
Python - How to prettyprint a JSON file?

How do I pretty-print a JSON file in Python?

40
Votes
Published 09 Aug, 2022
Jquery - Create Image based on JSON output

I need help to create set of images via JSON in ASP .NET MVC4. Is it possible to do? My working code is following and I have no idea how to integrate that functionality. Thank you for any help! [...

4
Votes
Published 24 Apr, 2022
Python - How to encrypt JSON in python

I have a JSON file. I am running a program, in python, where data is extracted from the JSON file. Is there any way to encrypt the JSON file with a key, so that if someone randomly opens the file, it...

109
Votes
Published 09 Aug, 2022
Jquery - how to get two arrays from php using json,jquery ajax?

I want to build a graph in jqchart where i need to get two arrays Now i want to perform operation as given below.Which is giving error ofcourse. html $.ajax( { type: "GET",...

84
Votes
Published 31 Aug, 2022
Python - Why json.dumps() in python 3 return a different value of python 2?

I need to generate a MD5 Hash in Python 3 to compare with a MD5 Hash that was generated on Python 2, but the result for json.dumps() is different, because on Python 2 the position of the elements chan...

41
Votes
Published 05 Aug, 2022
Jquery - Pass javascript array to C# via json

I´m using this javascript array: var exportOptions = [{ jobName: ""}, {exportType: ""}, {attachToEmail: ""}, {distributorName: ""}, {vista...

22
Votes
Published 28 Jun, 2022
Python - Split JSON file in equal/smaller parts with Python

I am currently working on a project where I use Sentiment Analysis for Twitter Posts. I am classifying the Tweets with Sentiment140. With the tool I can classify up to 1,000,000 Tweets per day and I h...