Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    dogfood 0.0.1

    Download button

    No screenshots available
    Downloads: 152  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Derek Arnold | More programs
    BSD License / FREE
    February 21st, 2011, 20:29 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    dogfood description

    Reasonable JSON serialization for custom classes

    The dogfood package provides JSON serialization for custom Python classes. To make any class serializable, either

    * add the attribute __food__
    * subclass Food


    You'll also need to supply an __encode__() method that returns a list in the form:

      def __encode__(self):
          return ['ClassName', [self.arg, self.arg2]]


    Where ClassName is the name of your class, and the arguments in the list are those to create a new instance. This module does not support repopulating the __dict__ of the object, just recreating from the __init__ arguments.


    Product's homepage

    Requirements:

    · Python
    · jsonlib
    · Cython

      


    TAGS:

    serialize classes | JSON serialization | custom classes | JSON | classes | serialization

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM