All Questions
Tagged with json python-3.x
5,026 questions
1
vote
1
answer
47
views
Create Log note from client xmlrpc in odoo18
I am trying to create log notes through client xmlprc library from reading log notes through json file in helpdesk module but stuck with an typeError named positional arguments not as expected.
here ...
0
votes
0
answers
138
views
How to correctly use icici breeze api?
I am fresher working on a project relating to icici breeze api and I am stuck for a long time now. Any help will be much appreciated.
from datetime import datetime
import hashlib
import http.client
...
0
votes
0
answers
30
views
How to Dynamically Parse Nested Configurations Without Explicit Recursion in Python using Match?
I’m exploring the new match statement introduced in Python 3.10. I want to learn how to parse JSON strings or YAML.
Here’s the specific problem:
The configuration structure can vary significantly ...
1
vote
2
answers
156
views
How to pass a json as a string argument in python code with use of argsparse and Powershell? [duplicate]
I've been wrapping my head around this problem and can't find a solution.
I have a pretty simple code:
import argparse
import json
def main():
parser = argparse.ArgumentParser(description="...
0
votes
3
answers
65
views
Spliting a JSON list obj into multiple based on values in python
I have JSON object something like below,
Data = [
{
'Name': 'A1',
'Value': 10,
'Type': 'AAA'
},
{
'Name': 'A1',
'Value': 20,
'Type': 'AAA'
...
0
votes
0
answers
39
views
Getting RunError.JsonParseError while trying to convert key-value pairs into JSON string with sorted keys
I’m trying to write a Python program that takes a number of key-value pairs, sorts them by key, and then converts them into a JSON string. However, I keep getting a RunError.JsonParseError when I try ...
0
votes
1
answer
53
views
How to have a Local Python Script Send a Dictionary via SSH to a Remote Python Script
In theory
My goal is to have a python script ("s1.py"), which is running locally, initiate a second python script ("s2.py") via ssh on a remote machine. As part of starting s2.py, ...
0
votes
2
answers
261
views
Best practice to load a json in a python module
I have a custom Python module, call it mymodule, with a function that loads some data in a json file according to a key:
import json
def fetch_data(k):
fname = os.path.join(
os.path....
0
votes
0
answers
28
views
convert ensta API Post type to json in python?
I have used Ensta API to fetch data from instagram API -
from ensta import Guest
guest = Guest()
posts = guest.posts(username='kapilsharma', count=1)
for post in posts:
print(post)
print(...
0
votes
0
answers
31
views
convert tab delimited file as json without changing the input key value integer or float and without quote to the value
I'm converting the two column tab delimited file as JSON format, together with set of keys and argument sample_id = 'WGNP1000001'.
Here's my input and expected output format and the code. Appreciate ...
0
votes
0
answers
39
views
merge json files with unique and selected objects only
I have two json files with set of common objects {"sample": {"id": "xxxx"}, "wgs_metrics", "aln_metrics" {}, "variant_metrics" {}. I want to ...
0
votes
1
answer
91
views
How to directly get the output of subprocess.check_output as valid json rather than reading the results stored in a file?
I have a system command which produces json output: ($ cmd -J > file).
I can read this data perfectly well into a dict using:
with open("file", "r") as i:
data=json.loads(i)
...
0
votes
2
answers
84
views
How convert CSV table structure to JSON using Python?
Today I have a challenge at my school, it is convert a CSV file to a JSON file.
This CSV has a table structure (which means contains the information from an oracle table in this example). So i have to ...
1
vote
0
answers
55
views
How to merge two json files key values and keep the redundant objects unique [duplicate]
I have two json files with set of common objects {"sample": {"id": "NA12878"}, "wgs_metrics":. I want to merge them together and keep the redundant objects once ...
0
votes
1
answer
144
views
Python to convert tab delimited file as json with supplied argument and additional keys
I'm looking to convert the two column tab delimited file to a 'key:value' and dump as json format, together with set of keys and argument sample_id = 'WGNP1000001'. Here's my input and expected output ...