Skip to main content

All Questions

Tagged with
0 votes
0 answers
14 views

Creating an XML object collection

I have an XML file and that needs to be converted into a specific json format with Items in it. Items will be a collection where it can have 1 or 2 items in it based on my XML file. When i am `trying ...
Neha Rastogi's user avatar
0 votes
0 answers
26 views

Best practice instance objects - dictionary vs object

let's say I have a complexe object with hundrets of properties. Is there a real downside using dictionaries instead of hierarchical objects? In the past I used objects with complexe structure, but I ...
Doe's user avatar
  • 141
-2 votes
1 answer
100 views

How to add new object to empty json file using the fetch API

(using Javascript & React) I'm trying to create a form that allows users to create their own tables, they would specify the table's name, headers and data, and I would use a POST fetch method to ...
JVDS1069's user avatar
0 votes
1 answer
61 views

Json to Groovy list of objects

I want to transform this json: [ { "askey": { "ad": "000001", "bt": 1 }, "Id": { "mc": 30, "zs&...
Jose Martins's user avatar
1 vote
3 answers
102 views

how can match two list and remove duplicate based on condition on dictionary in list

I want to merge two lists and get data matched without duplicates and to alias them to new structure I have two lists here is a given two list try to merge cats = [ 'orange', 'apple', 'banana' ] ...
test new jiras 's user avatar
2 votes
5 answers
124 views

How to filter and print particular json dictionaries in python

I'm in the process of learning python. I encountered a problem with json that I can't overcome. I have this dataset from json in python: { "Sophos": { "detected": true, ...
k1np3r's user avatar
  • 25
0 votes
1 answer
24 views

How to pull out specific elements in a json file and store them in another dictionary? How to properly Iterate through dictionary/json file?

I have a Json file that I am trying to pull out certain values and not touch some of the others. The only way I can seem to pull out values is by appending them to a list, which I can only access one ...
TheDude's user avatar
  • 27
0 votes
2 answers
346 views

Renaming "key" in map using `Dart`

My intention is to format the name key in an existing Map value. Supposed the current key value is in UpperCase but I wanted to make it LowerCase From this Map<String, String> foo = { &...
钟智强's user avatar
  • 480
1 vote
2 answers
62 views

Rename incrementing JSON objects in python

I have a JSON file that looks like this: "153689763780624385": { "1": { "author": "Mike", "date": "05/06/2022, 12:00:57" ...
MikWCR's user avatar
  • 35
0 votes
0 answers
164 views

AttributeError: 'str' object has no attribute 'show_credit'

I try to create an object saving account and store it in a dictionary and this works fine but when i try to use the object of the dictionary with an method i get an error, so im not sure what im doing ...
Winston's user avatar
  • 15
-1 votes
1 answer
250 views

Gson calls my JSON "map". How can I change the element/root name?

I'm using Java to print a JSON object (containing several objects). I would like to print that object in JSON style. So I use Gson to make a String out of it, which is then printed. But it always ...
justask's user avatar
  • 11
2 votes
1 answer
2k views

How to convert nested classes to json or dict?

I have class of classes as below: class Base: def __init__(self): self.var1 = “variable” class Child: def __init__(self): self.base = Base() self.var2 = False class RootChild: def ...
Erdem Tuna's user avatar
0 votes
2 answers
131 views

Iterate through nested dictionary of type String: Any

So basically I'm trying to build a financial app for myself using an external api. I successfully decoded the json response and stored the object into a dictionary of type [String: Any]. Here is my ...
Maanas's user avatar
  • 43
1 vote
2 answers
48 views

Convert multiple python strings to object

I have been looking for a solution to my problem for a few hours. Do you know a method or an algorithm to achieve the following? #Input text1 = "network.routes.vlan[0].address" val1 = "...
Noah's user avatar
  • 11
0 votes
1 answer
132 views

Groovy map (with array position of item) to json list of objects

Input : import groovy.json.JsonBuilder new JsonBuilder([test: 'test', test2: 'test2']).toPrettyString() or import groovy.json.JsonOutput JsonOutput.prettyPrint(JsonOutput.toJson([test: 'test', test2: ...
SUDDEN RISER's user avatar

15 30 50 per page
1
2 3 4 5