Need advice about which tool to choose?Ask the StackShare community!

Common Lisp

256
250
+ 1
145
JSON

1.9K
1.6K
+ 1
9
Add tool

Common Lisp vs JSON: What are the differences?

  1. Syntax: Common Lisp uses a Lisp-like syntax with s-expressions, while JSON uses a lightweight, human-readable format for data interchange.
  2. Data Types: Common Lisp supports a wide range of data types including lists, arrays, structures, and symbols, whereas JSON primarily deals with key-value pairs and arrays.
  3. Functions: Common Lisp is a full-fledged programming language with support for defining functions, macros, and objects, whereas JSON is limited to representing data structures and does not have built-in functions.
  4. Expressiveness: Common Lisp offers a high level of expressiveness with its macro system, object-oriented programming features, and support for advanced programming paradigms, while JSON is simpler and primarily used for data serialization.
  5. Literals: Common Lisp allows the use of symbols, strings, and numbers as literals in its code, whereas JSON only allows strings, numbers, boolean values, arrays, and objects.
  6. Usage: Common Lisp is typically used for developing complex applications, AI systems, and symbolic manipulation tasks, while JSON is commonly used for storing and transmitting data between web servers and clients.

In Summary, Common Lisp and JSON differ in syntax, data types, functions, expressiveness, literals, and usage.

Advice on Common Lisp and JSON
Needs advice
on
JSONJSON
and
PythonPython

Hi. Currently, I have a requirement where I have to create a new JSON file based on the input CSV file, validate the generated JSON file, and upload the JSON file into the application (which runs in AWS) using API. Kindly suggest the best language that can meet the above requirement. I feel Python will be better, but I am not sure with the justification of why python. Can you provide your views on this?

See more
Replies (3)
Recommends
on
PythonPython

Python is very flexible and definitely up the job (although, in reality, any language will be able to cope with this task!). Python has some good libraries built in, and also some third party libraries that will help here. 1. Convert CSV -> JSON 2. Validate against a schema 3. Deploy to AWS

  1. The builtins include json and csv libraries, and, depending on the complexity of the csv file, it is fairly simple to convert:
import csv
import json

with open("your_input.csv", "r") as f:
    csv_as_dict = list(csv.DictReader(f))[0]

with open("your_output.json", "w") as f:
    json.dump(csv_as_dict, f)
  1. The validation part is handled nicely by this library: https://pypi.org/project/jsonschema/ It allows you to create a schema and check whether what you have created works for what you want to do. It is based on the json schema standard, allowing annotation and validation of any json

  2. It as an AWS library to automate the upload - or in fact do pretty much anything with AWS - from within your codebase: https://aws.amazon.com/sdk-for-python/ This will handle authentication to AWS and uploading / deploying the file to wherever it needs to go.

A lot depends on the last two pieces, but the converting itself is really pretty neat.

See more
Recommends
on
GolangGolang

I would use Go. Since CSV files are flat (no hierarchy), you could use the encoding/csv package to read each row, and write out the values as JSON. See https://medium.com/@ankurraina/reading-a-simple-csv-in-go-36d7a269cecd. You just have to figure out in advance what the key is for each row.

See more
Max Musing
Founder & CEO at BaseDash · | 1 upvotes · 289.1K views
Recommends
on
Node.jsNode.js
at

This should be pretty doable in any language. Go with whatever you're most familiar with.

That being said, there's a case to be made for using Node.js since it's trivial to convert an object to JSON and vice versa.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Common Lisp
Pros of JSON
  • 24
    Flexibility
  • 22
    High-performance
  • 17
    Comfortable: garbage collection, closures, macros, REPL
  • 13
    Stable
  • 12
    Lisp
  • 8
    Code is data
  • 6
    Can integrate with C (via CFFI)
  • 6
    Multi paradigm
  • 5
    Lisp is fun
  • 4
    Macros
  • 4
    Easy Setup
  • 3
    Parentheses
  • 3
    Open source
  • 3
    Purelly functional
  • 3
    Elegant
  • 1
    DSLs
  • 1
    Multiple values
  • 1
    CLOS/MOP
  • 1
    Clean semantics
  • 1
    Will still be relevant 100 years from now
  • 1
    Still decades ahead of almost all programming languages
  • 1
    Best programming language
  • 1
    Simple syntax
  • 1
    Powerful
  • 1
    Generic functions
  • 1
    Can implement almost any feature as a library
  • 1
    Formal specification, multiple implementations
  • 5
    Simple
  • 4
    Widely supported

Sign up to add or upvote prosMake informed product decisions

Cons of Common Lisp
Cons of JSON
  • 4
    Too many Parentheses
  • 3
    Standard did not evolve since 1994
  • 2
    Small library ecosystem
  • 2
    No hygienic macros
  • 1
    Inadequate community infrastructure
  • 1
    Ultra-conservative community
    Be the first to leave a con

    Sign up to add or upvote consMake informed product decisions

    What is Common Lisp?

    Lisp was originally created as a practical mathematical notation for computer programs, influenced by the notation of Alonzo Church's lambda calculus. It quickly became the favored programming language for artificial intelligence (AI) research. As one of the earliest programming languages, Lisp pioneered many ideas in computer science, including tree data structures, automatic storage management, dynamic typing, conditionals, higher-order functions, recursion, and the self-hosting compiler. [source: wikipedia]

    What is JSON?

    JavaScript Object Notation is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use Common Lisp?
    What companies use JSON?
    See which teams inside your own company are using Common Lisp or JSON.
    Sign up for StackShare EnterpriseLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Common Lisp?
    What tools integrate with JSON?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    Blog Posts

    Aug 28 2019 at 3:10AM

    Segment

    PythonJavaAmazon S3+16
    7
    2556
    What are some alternatives to Common Lisp and JSON?
    Clojure
    Clojure is designed to be a general-purpose language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming. Clojure is a compiled language - it compiles directly to JVM bytecode, yet remains completely dynamic. Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy and a powerful macro system.
    Haskell
    It is a general purpose language that can be used in any domain and use case, it is ideally suited for proprietary business logic and data analysis, fast prototyping and enhancing existing software environments with correct code, performance and scalability.
    Python
    Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
    Racket
    It is a general-purpose, multi-paradigm programming language based on the Scheme dialect of Lisp. It is designed to be a platform for programming language design and implementation. It is also used for scripting, computer science education, and research.
    Java
    Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!
    See all alternatives