Skip to content

Instantly share code, notes, and snippets.

@razbakov
Last active January 6, 2024 05:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save razbakov/ed1522ee3fbfc148eab0 to your computer and use it in GitHub Desktop.
Save razbakov/ed1522ee3fbfc148eab0 to your computer and use it in GitHub Desktop.
json format

Which JSON format would you recommend to use?

Full

{
    "name": "kirchbergerknorr/teamalpin",
    "description": "Teamalpin",
    "minimum-stability": "dev",
    "authors": [
        {
            "name": "Aleksey Razbakov",
            "email": "ar@kirchbergerknorr.de"
        }
    ],
    "require": {
        "kirchbergerknorr/IWD_Opc": "4.0.5",
        "kirchbergerknorr/IWD_All": "1.2.1",
        "kirchbergerknorr/Kirchbergerknorr_GoogleBase": "0.1.14",
        "connect20/dixeno_findologic": "1.4.9",
        "ebizmarts/magemonkey": "dev-develop",
        "kirchbergerknorr/Rayfox_Catalog": "*",
        "kirchbergerknorr/magento-debug": "*",
        "kirchbergerknorr/magento": "1.9.0.*",
        "tzyganu/Switcher": "*",
        "connect20/pn_sofortueberweisung": "3.0.4",
        "payone/magento": "*",
        "magento-hackathon/magento-composer-installer":"*"
    },
    "require-dev": {
        "kirchbergerknorr/magento-dev": "*"
    },
    "extra": {
        "magento-root-dir": "src",
        "auto-append-gitignore": true,
        "magento-deploystrategy": "copy",
        "magento-force": true
    },
    "repositories": [
        {
            "type": "git",
            "url": "https://github.com/kirchbergerknorr/magento-dev"
        },
        {
            "type": "git",
            "url": "https://github.com/kirchbergerknorr/magento-debug"
        },
        {
            "type": "git",
            "url": "https://github.com/kirchbergerknorr/IWD_Opc"
        },
        {
            "type": "git",
            "url": "https://github.com/kirchbergerknorr/IWD_All"
        },
        {
            "type": "git",
            "url": "https://github.com/kirchbergerknorr/Kirchbergerknorr_GoogleBase"
        },
        {
            "type": "git",
            "url": "https://github.com/quafzi/payone-magento"
        },
        {
            "type": "git",
            "url": "https://github.com/kirchbergerknorr/Rayfox_Catalog"
        },
        {
            "type": "git",
            "url": "https://github.com/integer-net/BillSAFE"
        },
        {
            "type": "git",
            "url": "https://github.com/tzyganu/Switcher"
        },
        {
            "type": "git",
            "url": "https://github.com/quafzi/payone-magento"
        },
        {
            "type": "git",
            "url": "https://github.com/Cotya/magento-composer-installer"
        },
        {
            "type": "composer",
            "url": "http://packages.firegento.com"
        }
    ]
}

Compact

{
    "name": "kirchbergerknorr/magento-1.9",
    "description": "Magento 1.9 Sample",
    "minimum-stability": "dev",
    "authors": [
        {"name": "Aleksey Razbakov", "email": "ar@kirchbergerknorr.de"}
    ],
    "require": {
        "kirchbergerknorr/IWD_Opc": "4.0.5",
        "kirchbergerknorr/IWD_All": "1.2.1",
        "kirchbergerknorr/Kirchbergerknorr_GoogleBase": "0.1.14",
        "connect20/dixeno_findologic": "1.4.9",
        "ebizmarts/magemonkey": "dev-develop",
        "kirchbergerknorr/Rayfox_Catalog": "*",
        "kirchbergerknorr/magento-debug": "*",
        "kirchbergerknorr/magento": "1.9.0.*",
        "tzyganu/Switcher": "*",
        "connect20/pn_sofortueberweisung": "3.0.4",
        "payone/magento": "*",
        "magento-hackathon/magento-composer-installer":"*"
    },
    "require-dev": {
        "kirchbergerknorr/magento-dev": "*"
    },
    "extra": {
        "magento-root-dir": "src",
        "auto-append-gitignore": true,
        "magento-deploystrategy": "copy",
        "magento-force": true
    },
    "repositories": [
         {"type": "composer", "url": "http://packages.firegento.com"}
        ,{"type": "git", "url": "https://github.com/Cotya/magento-composer-installer"}
        ,{"type": "git", "url": "https://github.com/kirchbergerknorr/magento-dev"}
        ,{"type": "git", "url": "https://github.com/kirchbergerknorr/magento-debug"}
        ,{"type": "git", "url": "https://github.com/kirchbergerknorr/IWD_Opc"}
        ,{"type": "git", "url": "https://github.com/kirchbergerknorr/IWD_All"}
        ,{"type": "git", "url": "https://github.com/kirchbergerknorr/Kirchbergerknorr_GoogleBase"}
        ,{"type": "git", "url": "https://github.com/quafzi/payone-magento"}
        ,{"type": "git", "url": "https://github.com/kirchbergerknorr/Rayfox_Catalog"}
        ,{"type": "git", "url": "https://github.com/integer-net/BillSAFE"}
        ,{"type": "git", "url": "https://github.com/tzyganu/Switcher"}
        ,{"type": "git", "url": "https://github.com/quafzi/payone-magento"}
    ]
}

Advantages of compact view

  • see all lines at one screen, no need to scroll
  • work with view as with table (group visially identical words)
  • easily sort with your IDE by moving lines
  • remove object - remove one line: add, delete, move objects easily
  • keep your git diffs clean and easy-to read
  • easy to search information

Notice

  • 1 object = 1 line
  • comma before object: clean git diff, less problems with syntax when adding, deleting, moving lines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment