Coder Social home page Coder Social logo

osamaelsherif / jsondf Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 115 KB

A project for reading JSON data and parse it for DataFrame

Home Page: https://pypi.org/project/JsonDF/

License: MIT License

Python 100.00%
dataframe json json-parser python python-json package-json pandas pandas-dataframe pandas-python python-library

jsondf's People

Watchers

 avatar  avatar

Forkers

hushmkun

jsondf's Issues

ability to edit value in json

there will be a method called edit, that takes the name of the field, and the new value of it.

json = Json()
json.edit(name='existing name', value='new value for it')

ability to add values to JSON

I will make a method inside the JSON object that makes you have the ability to add values inside the JSON.

it will be like :

json = JSON()
json.insert(name='values name', value='value of it')

search inside Json

a method that gives you the ability to to search inside a json based on the name that's given to it.

json = Json()
json.find(name='name to find')

Searializer doesn't handle instances of the object

The searlizer handles only the objet it self but doesn't handle the instances of that object and giving error cause
'__module__' doesn't have __name__ attribute do you mean __ne__

it doesn't a bug as it's doesn't work in the way it intended to work,
cause it supposed to work with the object itself and instance also.

reformate the output of searching methods [find(), find_all()]

I want to change how the output shows tha there is a value that it is found.

if the structure is

{
    'key1' : 'value1',
    'key2': {
         'key3': 'value 3',
         'key4': 'value4',
    }
}

and I want to search about the key3

I want the output to be

{'key2.key4': 'value4'}

and if there is more than one result it will be in the same dict, but different in the structure.

find_all() method doesn't find names in the same depth.

if we have json_data like thids :

from FjJson import Json

json_data = {
    "employees": [
        {"name": "Alice", "age": 30},
        {"name": "Bob", "age": 25}
    ]
}

j = Json("DataBase", json_data).objectify()
print(j.find_all("name"))

and we did find_add method to it finding all the name we get only the last match, and the output will be like this ::

({(1, 'name', 'DataBase.employees'): 'Bob'}, True)

while it should giving :

[ ( { (1, 'name', 'DataBase.employees'): 'Bob' } , True ), ( { (1, 'name', 'DataBase.employees'): 'Alice' } , True )  ]

ability to delete a value in JSON

there will be a method that takes the name and deletes the name and the value from JSON,
and there will be another method to dumb the value of that name inside the JSON.

json = Json()
json.delete(name='existing name in the json')
json.dumb(name='dumbing the name value in the json')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.