Skip to content

Commit 3b67c60

Browse files
Drop jsonexample (#2089)
1 parent b29a016 commit 3b67c60

File tree

156 files changed

+8
-7715
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+8
-7715
lines changed

jsonexample/.gitignore

Lines changed: 0 additions & 33 deletions
This file was deleted.

jsonexample/.metadata

Lines changed: 0 additions & 45 deletions
This file was deleted.

jsonexample/README.md

Lines changed: 8 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,10 @@
1-
# jsonexample
1+
## `jsonexample` sample retired
22

3-
A Flutter sample app that deserializes a set of JSON strings using three
4-
different libraries: `dart:convert`, `json_serializable`, and
5-
`built_value`.
6-
7-
## Goals for this sample
8-
9-
* Help you decide which of the three most common libraries for
10-
deserializing JSON is right for your project.
11-
* Provide you with example code for deserializing:
12-
* Simple and nested objects
13-
* Lists of primitive values
14-
* Maps containing primitive values
15-
16-
## The important bits
17-
18-
### `json_strings.dart`
19-
20-
The actual JSON to be deserialized.
21-
22-
### `dart_convert`/`json_serializable`/`dart_convert`
23-
24-
These folders contain code used to deserialize the simple and complex
25-
object models using one of the three libraries. They do the work of
26-
instantiating models and populating their fields.
27-
28-
### `tab_pages.dart`
29-
30-
Each tab page in the app deserializes one type of data with one library.
31-
These Widgets show what app code using the above libraries might look like.
32-
33-
## Generating
34-
35-
The lib/build_value and lib/json_serializable use build_runner to generate
36-
files. If you make a change to these files, you need to re-run the generator
37-
using `build_runner`:
38-
39-
```
40-
flutter pub run build_runner build
41-
```
42-
43-
## Questions/issues
44-
45-
If you have a general question about JSON serialization in Flutter, the
46-
best places to go are:
47-
48-
* [The FlutterDev Google Group](https://groups.google.com/forum/#!forum/flutter-dev)
49-
* [The Flutter Gitter channel](https://gitter.im/flutter/flutter)
50-
* [StackOverflow](https://stackoverflow.com/questions/tagged/flutter)
51-
52-
If you run into an issue with the sample itself, please file an issue
53-
in the [main Flutter repo](https://github.com/flutter/flutter/issues).
3+
The `jsonexample` sample has reached the end of it's useful life. It was great code
4+
when it has written, but the world has changed. Dart 3 introduced Patterns and
5+
records. There is also various JSON parsing tools like `json_serializable`.
546

7+
For further information, please see:
8+
- The [Dive into Dart's patterns and records](https://codelabs.developers.google.com/codelabs/dart-patterns-records)
9+
codelab for a deep dive into Dart 3's patterns and records with an application to parsing JSON
10+
- The Flutter.dev documentation on [JSON and serialization](https://docs.flutter.dev/data-and-backend/serialization/json)

jsonexample/analysis_options.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

jsonexample/android/.gitignore

Lines changed: 0 additions & 13 deletions
This file was deleted.

jsonexample/android/app/build.gradle

Lines changed: 0 additions & 67 deletions
This file was deleted.

jsonexample/android/app/src/debug/AndroidManifest.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

jsonexample/android/app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 33 deletions
This file was deleted.

jsonexample/android/app/src/main/kotlin/dev/flutter/jsonexample/MainActivity.kt

Lines changed: 0 additions & 6 deletions
This file was deleted.

jsonexample/android/app/src/main/res/drawable-v21/launch_background.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)