Get Advice Icon

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

JSON
JSON

338
270
+ 1
0
Swift
Swift

5.2K
3.3K
+ 1
1.1K
Add tool

JSON vs Swift: What are the differences?

JSON: A lightweight data-interchange format. 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; Swift: An innovative new programming language for Cocoa and Cocoa Touch. Writing code is interactive and fun, the syntax is concise yet expressive, and apps run lightning-fast. Swift is ready for your next iOS and OS X project — or for addition into your current app — because Swift code works side-by-side with Objective-C.

JSON and Swift belong to "Languages" category of the tech stack.

Swift is an open source tool with 48.4K GitHub stars and 7.76K GitHub forks. Here's a link to Swift's open source repository on GitHub.

According to the StackShare community, Swift has a broader approval, being mentioned in 994 company stacks & 541 developers stacks; compared to JSON, which is listed in 20 company stacks and 104 developer stacks.

- No public GitHub repository available -

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.

What is Swift?

Writing code is interactive and fun, the syntax is concise yet expressive, and apps run lightning-fast. Swift is ready for your next iOS and OS X project — or for addition into your current app — because Swift code works side-by-side with Objective-C.
Get Advice Icon

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

Why do developers choose JSON?
Why do developers choose Swift?
    Be the first to leave a pro

    Sign up to add, upvote and see more prosMake informed product decisions

      Be the first to leave a con

      Sign up to add, upvote and see more consMake informed product decisions

      What companies use JSON?
      What companies use Swift?

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

      What tools integrate with JSON?
      What tools integrate with Swift?

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

      What are some alternatives to JSON and Swift?
      YAML
      A human-readable data-serialization language. It is commonly used for configuration files, but could be used in many applications where data is being stored or transmitted.
      Protobuf
      Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler.
      Avro
      It is a row-oriented remote procedure call and data serialization framework developed within Apache's Hadoop project. It uses JSON for defining data types and protocols, and serializes data in a compact binary format.
      MongoDB
      MongoDB stores data in JSON-like documents that can vary in structure, offering a dynamic, flexible schema. MongoDB was also designed for high availability and scalability, with built-in replication and auto-sharding.
      OData
      It is an ISO/IEC approved, OASIS standard that defines a set of best practices for building and consuming RESTful APIs. It helps you focus on your business logic while building RESTful APIs without having to worry about the various approaches to define request and response headers, status codes, HTTP methods, URL conventions, media types, payload formats, query options, etc.
      See all alternatives
      Decisions about JSON and Swift
      StackShare Editors
      StackShare Editors
      Angular
      Angular
      jQuery
      jQuery
      Objective-C
      Objective-C
      Swift
      Swift
      Go
      Go
      Ruby
      Ruby
      Java
      Java
      React
      React
      Python
      Python
      Node.js
      Node.js
      Rails
      Rails

      By mid-2015, around the time of the Series E, the Digital department at WeWork had grown to more than 40 people to support the company’s growing product needs.

      By then, they’d migrated the main website off of WordPress to Ruby on Rails, and a combination React, Angular, and jQuery, though there were efforts to move entirely to React for the front-end.

      The backend was structured around a microservices architecture built partially in Node.js, along with a combination of Ruby, Python, Bash, and Go. Swift/Objective-C and Java powered the mobile apps.

      These technologies power the listings on the website, as well as various internal tools, like community manager dashboards as well as RFID hardware for access management.

      See more
      StackShare Editors
      StackShare Editors
      Objective-C
      Objective-C
      Gradle
      Gradle
      Swift
      Swift
      Java
      Java

      At the heart of Uber’s mobile app development are four primary apps: Android rider, Android driver, iOS rider, and iOS driver. Android developers build in Java, iOS in Objective C and Swift. Engineers across both platforms land code into a monolithic code base that ships each week.

      They use some third-party libraries, but often build their own, since “Many open source libraries available are general-purpose, which can create binary bloat. For mobile engineering, every kilobyte matters.”

      On Android, the build system is Gradle. For the UI, Butter Knife binds views and callbacks to fields and methods via annotation processing, and Picasso provides image loading.

      As for iOS, all of the code lives in a monorepo built with Buck. For crash detection, KSCrash reports crashes to the internal reporting framework.

      See more
      Conor Myhrvold
      Conor Myhrvold
      Tech Brand Mgr, Office of CTO at Uber · | 8 upvotes · 423.6K views
      atUber TechnologiesUber Technologies
      RIBs
      RIBs
      Swift
      Swift
      Objective-C
      Objective-C

      Excerpts from how we developed (and subsequently open sourced) Uber's cross-platform mobile architecture framework, RIBs , going from Objective-C to Swift in the process for iOS: https://github.com/uber/RIBs

      Uber’s new application architecture (RIBs) extensively uses protocols to keep its various components decoupled and testable. We used this architecture for the first time in our new rider application and moved our primary language from Objective-C to Swift. Since Swift is a very static language, unit testing became problematic. Dynamic languages have good frameworks to build test mocks, stubs, or stand-ins by dynamically creating or modifying existing concrete classes.

      Needless to say, we were not very excited about the additional complexity of manually writing and maintaining mock implementations for each of our thousands of protocols.

      The information required to generate mock classes already exists in the Swift protocol. For Uber’s use case, we set out to create tooling that would let engineers automatically generate test mocks for any protocol they wanted by simply annotating them.

      The iOS codebase for our rider application alone incorporates around 1,500 of these generated mocks. Without our code generation tool, all of these would have to be written and maintained by hand, which would have made testing much more time-intensive. Auto-generated mocks have contributed a lot to the unit test coverage that we have today.

      We built these code generation tools ourselves for a number of reasons, including that there weren’t many open source tools available at the time we started our effort. Today, there are some great open source tools to generate resource accessors, like SwiftGen. And Sourcery can help you with generic code generation needs:

      https://eng.uber.com/code-generation/ https://eng.uber.com/driver-app-ribs-architecture/

      (GitHub : https://github.com/uber/RIBs )

      See more
      StackShare Editors
      StackShare Editors
      Apache Thrift
      Apache Thrift
      Kotlin
      Kotlin
      Presto
      Presto
      HHVM (HipHop Virtual Machine)
      HHVM (HipHop Virtual Machine)
      gRPC
      gRPC
      Kubernetes
      Kubernetes
      Apache Spark
      Apache Spark
      Airflow
      Airflow
      Terraform
      Terraform
      Hadoop
      Hadoop
      Swift
      Swift
      Hack
      Hack
      Memcached
      Memcached
      Consul
      Consul
      Chef
      Chef
      Prometheus
      Prometheus

      Since the beginning, Cal Henderson has been the CTO of Slack. Earlier this year, he commented on a Quora question summarizing their current stack.

      Apps
      • Web: a mix of JavaScript/ES6 and React.
      • Desktop: And Electron to ship it as a desktop application.
      • Android: a mix of Java and Kotlin.
      • iOS: written in a mix of Objective C and Swift.
      Backend
      • The core application and the API written in PHP/Hack that runs on HHVM.
      • The data is stored in MySQL using Vitess.
      • Caching is done using Memcached and MCRouter.
      • The search service takes help from SolrCloud, with various Java services.
      • The messaging system uses WebSockets with many services in Java and Go.
      • Load balancing is done using HAproxy with Consul for configuration.
      • Most services talk to each other over gRPC,
      • Some Thrift and JSON-over-HTTP
      • Voice and video calling service was built in Elixir.
      Data warehouse
      • Built using open source tools including Presto, Spark, Airflow, Hadoop and Kafka.
      Etc
      See more
      SVN (Subversion)
      SVN (Subversion)
      Git
      Git
      JSON
      JSON
      XML
      XML
      Python
      Python
      PHP
      PHP
      Java
      Java
      Swift
      Swift
      JavaScript
      JavaScript
      Linux
      Linux
      GitHub
      GitHub
      Visual Studio Code
      Visual Studio Code

      I use Visual Studio Code because at this time is a mature software and I can do practically everything using it.

      • It's free and open source: The project is hosted on GitHub and it’s free to download, fork, modify and contribute to the project.

      • Multi-platform: You can download binaries for different platforms, included Windows (x64), MacOS and Linux (.rpm and .deb packages)

      • LightWeight: It runs smoothly in different devices. It has an average memory and CPU usage. Starts almost immediately and it’s very stable.

      • Extended language support: Supports by default the majority of the most used languages and syntax like JavaScript, HTML, C#, Swift, Java, PHP, Python and others. Also, VS Code supports different file types associated to projects like .ini, .properties, XML and JSON files.

      • Integrated tools: Includes an integrated terminal, debugger, problem list and console output inspector. The project navigator sidebar is simple and powerful: you can manage your files and folders with ease. The command palette helps you find commands by text. The search widget has a powerful auto-complete feature to search and find your files.

      • Extensible and configurable: There are many extensions available for every language supported, including syntax highlighters, IntelliSense and code completion, and debuggers. There are also extension to manage application configuration and architecture like Docker and Jenkins.

      • Integrated with Git: You can visually manage your project repositories, pull, commit and push your changes, and easy conflict resolution.( there is support for SVN (Subversion) users by plugin)

      See more
      Markdown
      Markdown
      Docker
      Docker
      JSON
      JSON
      TypeScript
      TypeScript
      Atom
      Atom
      Visual Studio Code
      Visual Studio Code
      Angular 2
      Angular 2
      #Typescript
      #Java
      #HTML
      #Sass

      More than year ago I was looking for the best editor of Angular 2 application and I've tried Visual Studio Code and Atom. Atom had performance issues that put me off completely to use it again. Visual Studio Code became my main editor #Typescript files (and partly editor of #Java files). I'm happy with Visual Studio Code and I've never look back on Atom. There wasn't any reason to try Atom again, because Visual Studio Code fulfills my requirements very well. I use it for editing of TypeScript, #HTML, #Sass, JSON, Docker and Markdown.

      See more
      Ali Soueidan
      Ali Soueidan
      Creative Web Developer at Ali Soueidan · | 16 upvotes · 92.4K views
      npm
      npm
      Babel
      Babel
      PHP
      PHP
      Adobe Illustrator
      Adobe Illustrator
      Asana
      Asana
      ES6
      ES6
      GitHub
      GitHub
      Git
      Git
      JSON
      JSON
      Sass
      Sass
      Pug
      Pug
      JavaScript
      JavaScript
      vuex
      vuex
      Vue.js
      Vue.js

      Application and Data: Since my personal website ( https://alisoueidan.com ) is a SPA I've chosen to use Vue.js, as a framework to create it. After a short skeptical phase I immediately felt in love with the single file component concept! I also used vuex for state management, which makes working with several components, which are communicating with each other even more fun and convenient to use. Of course, using Vue requires using JavaScript as well, since it is the basis of it.

      For markup and style, I used Pug and Sass, since they’re the perfect match to me. I love the clean and strict syntax of both of them and even more that their structure is almost similar. Also, both of them come with an expanded functionality such as mixins, loops and so on related to their “siblings” (HTML and CSS). Both of them require nesting and prevent untidy code, which can be a huge advantage when working in teams. I used JSON to store data (since the data quantity on my website is moderate) – JSON works also good in combo with Pug, using for loops, based on the JSON Objects for example.

      To send my contact form I used PHP, since sending emails using PHP is still relatively convenient, simple and easy done.

      DevOps: Of course, I used Git to do my version management (which I even do in smaller projects like my website just have an additional backup of my code). On top of that I used GitHub since it now supports private repository for free accounts (which I am using for my own). I use Babel to use ES6 functionality such as arrow functions and so on, and still don’t losing cross browser compatibility.

      Side note: I used npm for package management. 🎉

      *Business Tools: * I use Asana to organize my project. This is a big advantage to me, even if I work alone, since “private” projects can get interrupted for some time. By using Asana I still know (even after month of not touching a project) what I’ve done, on which task I was at last working on and what still is to do. Working in Teams (for enterprise I’d take on Jira instead) of course Asana is a Tool which I really love to use as well. All the graphics on my website are SVG which I have created with Adobe Illustrator and adjusted within the SVG code or by using JavaScript or CSS (SASS).

      See more
      Interest over time
      Reviews of JSON and Swift
      Avatar of Bessalitskykh
      Software Development Consultan at MLSDev Inc.
      Review ofSwiftSwift

      The performance of Swift is almost the same as that of C++, which is considered the fastest in algorithm calculation arithmetics. Apple had this idea in mind and worked to improve the speed of Swift. For example, Swift 2.0 has beaten C++ in several computation algorithms, such as Mandelbrot algorithm. Objective-C is slower because it contains C API legacy.

      Swift is faster than Objective-C, because it removed the limitations of C language and has been improved with the help of advanced technologies that were unavailable when C was developed. As mentioned by Apple, Swift was originally designed to operate faster.

      Despite the fact that languages are different, they both integrate, and work with Cocoa and Cocoa Touch APIs, for all Apple platforms. Therefore, a regular app-user would not recognize the difference in operating speed between Objective-C vs Swift. Speed also depends on a programmer’s level and capabilities, since a slow app can be written in Swift as well.

      Learn more here https://mlsdev.com/blog/51-7-advantages-of-using-swift-over-objective-c

      Avatar of Bessalitskykh
      Software Development Consultan at MLSDev Inc.
      Review ofSwiftSwift

      Its performance approaches the one of C++ which is considered the fastest algorithm calculation arithmetics. And Apple strives to improve the speed of Swift. Learn more here https://mlsdev.com/blog/51-7-advantages-of-using-swift-over-objective-c

      How developers use JSON and Swift
      Avatar of Lawrence Cheuk
      Lawrence Cheuk uses SwiftSwift

      iPhone app, a new born language, it may good but the IDE, xcode is bad compare with Visual Studio. It just like a baby. playground can only use without connect to other library...you can not do a simply refactor of renaming a variable. You can go to definition and find reference, but you can not go to implementation....I should write them on xcode not here basically it is not the fault of swift, but it tightly to it, unless you want to use a notepad to write it.

      Avatar of Refractal
      Refractal uses SwiftSwift

      Most of our newer apps are written completely in swift, with our older ones and some special cases using a mix of Swift and Objective-C, but with Swift 2, the language is pretty much a must-use. "guard" is <3.

      Avatar of Flutter Health Inc.
      Flutter Health Inc. uses SwiftSwift

      Flutter is coded with Swift v.2.3 and can be run with Xcode v.8.2.1. To launch in Xcode 9.3, the code needs to be migrated to Swift 4.1

      Avatar of Maxim Ananov
      Maxim Ananov uses SwiftSwift

      Most of the app code was gradually rewritten in Swift for better performance and code maintenance.

      Avatar of JINJA Ltd.
      JINJA Ltd. uses SwiftSwift

      Our native iOS app is built on Swift, and most of the basic function is still written in Swift

      How much does JSON cost?
      How much does Swift cost?
      Pricing unavailable
      Pricing unavailable
      News about JSON
      More news