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

Dart

3.7K
3.6K
+ 1
452
JSON

1.9K
1.6K
+ 1
9
Add tool

Dart vs JSON: What are the differences?

# Introduction
Key differences between Dart and JSON are outlined below:

# 1. Data Representation:
**Dart**: Dart is a programming language developed by Google that is used to build web, mobile, and desktop applications. It is a statically typed language with type inference.
**JSON**: JSON, on the other hand, stands for JavaScript Object Notation and is a lightweight data interchange format. It is easy for humans to read and write but also easy for machines to parse and generate.

# 2. Usage:
**Dart**: Dart is used for writing code that runs on the client side, server side, or in mobile applications.
**JSON**: JSON is primarily used for data interchange between different programming languages.

# 3. Syntax:
**Dart**: Dart syntax is similar to C-style languages and is designed to be easy to read and write.
**JSON**: JSON syntax is based on JavaScript object syntax, consisting of key/value pairs.

# 4. Development Environment:
**Dart**: Dart code is typically written in an integrated development environment (IDE) like IntelliJ IDEA or Visual Studio Code.
**JSON**: JSON does not require any specific development environment as it is a data-interchange format.

# 5. Compatibility:
**Dart**: Dart is not natively supported by all browsers and requires compilation to JavaScript for browser compatibility.
**JSON**: JSON is natively supported by most programming languages and can be easily parsed across different platforms.

# 6. Functionality:
**Dart**: Dart enables developers to build complex applications with features like classes, interfaces, and asynchronous programming.
**JSON**: JSON is primarily used for storing and transmitting data, providing a simple and easy-to-use format without extensive programming functionality.

In Summary, Dart and JSON differ in terms of data representation, usage, syntax, development environment, compatibility, and functionality.
Advice on Dart 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 · 286.3K 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
Needs advice
on
DartDart
and
KotlinKotlin

Can anyone help me decide what's best for app development or even android Oreo development? I'm in a state dilemma at the moment. I want to do Android programming, not necessarily web development. I have heard a lot of people recommend one of these, and it seems that both the tools can do the job. Which language would you choose?

See more
Replies (4)
Ondrej Malek
Recommends
on
DartDart

I assume that you mean Flutter by Dart. I have over 6 years experience programming in Android SDK, but about 1,5 month in Flutter. So far I think that Flutter is the future for mobile development. Flutter SDK is much better designed. Ecosystem of libraries seems having much higher quality. I would even say that android opensource libs are having really poor quality. Many times I am wondering how can garbage like that have so many stars at GitHub. Android SDK is hard to compose so you reinvent even basic things on and on, which is totally different story at Flutter. Lolcycle? Both are having good documentation. I quess apps in Flutter can be done in 1/3 of time compared to develop AndroidSDK and iOS, its design is that much better and contemporary. As of language comparison - Kotlin is better, but the difference is not that important. Go from one language to other is no problem. Dart is being updated with new features.

See more
Recommends
on
DartDart

I've selected Flutter and Dart for my side projects and never regretted. Dart learning curve is easy after any OOP language . Flutter as a framework is also has a low entry threshold. I've already started development after a week of learning. Pros for me: code can be build for Android and IOS devices (for ios you need mac or VM), apps written in Dart have great performance on each of these platforms, flexibility. Cons: if you want to build a product as a business and want to hire a new Flutter Developer in the future it can be a problem as the framework and language is not popular for the moment.

See more
Ranjeet Sinha
Senior Software Engineer · | 3 upvotes · 257.5K views
Recommends
on
KotlinKotlin

It depends on what is the purpose of your app development. Do you want to make one app that shares the codebase for both iOS and Android? If yes, then Dart is the way to go. Does your app include interacting with hardware features like camera, Bluetooth, if yes, then go for native Android for better performance? Dart is good for simpler UI apps where you just do basic crud operations over the network and show data but if you need richer UI experience go with native.

See more
Tran Phuc
CTO at Nextfunc Co., Ltd · | 3 upvotes · 257.5K views
Recommends
on
DartDart

I have worked in mobile development since 2010. I have experienced myself on various techs including Native SDK (Android), React Native (from 2016) and Flutter (2018). Almost the apps nowadays can be built using cross-platforms frameworks like React Native or Flutter. I suggest you start with Flutter. Flutter SDK is designed well to speed up your development and it still keeps the quality for your apps. If you're familiar with OOP languages (Java, C#...), switching to Dart is really quick and easy. Of course, sometimes you will need to dive deep into native parts but almost the cases you don't need. Good luck!

See more
Needs advice
on
DartDartDjangoDjango
and
JavaScriptJavaScript

I am currently learning web development with Python and JavaScript course by CS50 Harvard university. It covers python, Flask, Django, SQL, Travis CI, javascript,HTML ,CSS and more. I am very interested in Flutter app development. Can I know what is the difference between learning these above-mentioned frameworks vs learning flutter directly? I am planning to learn flutter so that I can do both web development and app development. Are there any perks of learning these frameworks before flutter?

See more
Replies (5)
Gagan Jakhotiya
Engineering Manager at BigBasket · | 11 upvotes · 219.4K views
Recommends
on
Node.jsNode.js

Hey Muhamed, For web development, you'll have to learn how to write backend APIs and how to build UI for browsers, apps, etc. If you're just starting off with programming, I'd suggest you stick to one language and trying developing everything using it to cut the unnecessary learning overhead. Although Python and JavaScript are very similar for beginners, JavaScript is the only available option for both frontend and backend development for a web application. You can start working with Node.js for your API development and Vanilla JS along with HTML/CSS for UI. You'll only need to learn one language to do all of this. Hope this helps.

See more
Dennis Barzanoff
Recommends
on
DartDart

Flutter is good for everything and it is getting better as I am speaking. Flutter Web is almost ready for production and I have made 2 complex working websites already.

See more
Recommends
on
DartDart

Well. Flutter is just a Framework (just like Django btw.) and it uses Dart as a programming language. Django is kind of solving a different problem than Dart. Dart is intened for use in Front End Applications and Django is a Framework for Back-End Web Development.

So if you want to program Flutter Apps (although i wouldn't recommend it for any serious web development yet since Flutter web isn't very mature yet) i would recommend you just lern Dart.

See more
Yohnathan Carletti
Senior Technical Product Manager · | 3 upvotes · 213.4K views
Recommends
on
DartDart

From a management and hiring perspective, I recommend Flutter (Dart). It provides native solutions to both mobile platform ( (Android and IOS) while having the same knowledge. Hiring managers look at this as an advantage since a developer can provide solutions for both platforms whit the same knowledge. The Flutter framework is growing and there is a lot of resources to ground your knowledge and start experimenting. Dart is also a great language that covers most E2E necessities, so again, no further need of learning one language for FE and another for BE and services. It is my belief that Dart will surpass Kotlin soon, and will leverage to Python and Java in the upcoming year.

See more
Recommends
on
DartDart

If you are interested in Flutter, learn it on your own time, parallel to the course. No matter what order you do them, eventually you will end up learning them all anyway ;-)

See more
Decisions about Dart and JSON
Lucas Litton
Founder & CEO at Macombey · | 8 upvotes · 247.2K views

JavaScript is at the forefront of our entire development approach. Not only do we use different JavaScript frameworks and management tools, but we also use pure vanilla JavaScript to solve simple problems throughout all of our client's builds. JavaScript is a general purpose programming language that can be blazing fast and fun to work with. There's not one project we are working on that doesn't involve it.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Dart
Pros of JSON
  • 59
    Backed by Google
  • 53
    Flutter
  • 39
    Twice the speed of Javascript
  • 35
    Great tools
  • 30
    Scalable
  • 27
    Open source
  • 26
    Made for the future
  • 25
    Can be used on Frontend
  • 22
    Polymer Dart
  • 22
    Angular Dart
  • 18
    Cross platform
  • 16
    Like Java
  • 14
    Easy to learn
  • 13
    Dartanalyzer
  • 12
    Runs on Google Cloud Platform
  • 10
    Easy to Understand
  • 9
    Amazing concurrency primitives
  • 8
    Is to JS what C is to ASM
  • 7
    Flutter works with darts
  • 3
    R
  • 3
    Can run Dart in AWS Lambda
  • 1
    Looks familiar, with purposely implemented features
  • 5
    Simple
  • 4
    Widely supported

Sign up to add or upvote prosMake informed product decisions

Cons of Dart
Cons of JSON
  • 3
    Lack of ORM
  • 3
    Locked in - JS or TS interop is very hard to accomplish
  • 0
    A
    Be the first to leave a con

    Sign up to add or upvote consMake informed product decisions

    What is Dart?

    Dart is a cohesive, scalable platform for building apps that run on the web (where you can use Polymer) or on servers (such as with Google Cloud Platform). Use the Dart language, libraries, and tools to write anything from simple scripts to full-featured apps.

    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 Dart?
    What companies use JSON?
    See which teams inside your own company are using Dart 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 Dart?
    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
    2555
    What are some alternatives to Dart and JSON?
    TypeScript
    TypeScript is a language for application-scale JavaScript development. It's a typed superset of JavaScript that compiles to plain JavaScript.
    Golang
    Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language.
    JavaScript
    JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.
    Kotlin
    Kotlin is a statically typed programming language for the JVM, Android and the browser, 100% interoperable with Java
    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