Related
how can I re-create objects from a serialized/deserialized map of objects?
import 'dart:convert';
class InternalTx {
int a;
bool b;
InternalTx(this.a, this.b);
factory InternalTx.fromJson(Map<String, dynamic> json) =>
InternalTxFromJson(json);
Map<String, dynamic> toJson() => InternalTxToJson(this);
}
InternalTx InternalTxFromJson(Map<String, dynamic> json) => InternalTx(
json['a'] as int,
json['b'] as bool,
);
Map<String, dynamic> InternalTxToJson(InternalTx instance) => <String, dynamic>{
'a': instance.a,
'b': instance.b,
};
main() {
Map<String, InternalTx> m = {};
for (int i=0; i<10; i++)
{
InternalTx itx = InternalTx(i, false);
m["Hello: $i"] = itx;
}
String serM = jsonEncode(m);
print(serM);
////SERILIZED OKAY
Map<String, dynamic> n = jsonDecode(serM);
InternalTx newItx = n["Hello: 0"]; <-- Problem here.
print(newItx);
}
Output:
{"Hello: 0":{"a":0,"b":false},"Hello: 1":{"a":1,"b":false},"Hello: 2":{"a":2,"b":false},"Hello: 3":{"a":3,"b":false},"Hello: 4":{"a":4,"b":false},"Hello: 5":{"a":5,"b":false},"Hello: 6":{"a":6,"b":false},"Hello: 7":{"a":7,"b":false},"Hello: 8":{"a":8,"b":false},"Hello: 9":{"a":9,"b":false}}
Uncaught Error: TypeError: Instance of '_JsonMap': type '_JsonMap' is not a subtype of type 'InternalTx'
What is missing here to deserialize the map of objects correctly?
Thanks!
You need to actually call the InternalTx.fromJson constructor since this is not done automatically. So your last piece of code should be:
////SERILIZED OKAY
Map<String, dynamic> n = jsonDecode(serM);
InternalTx newItx = InternalTx.fromJson(n["Hello: 0"]);
print(newItx); // Instance of 'InternalTx'
Im working with rawg.io api and trying to get datas about games. There is a problem which i think it's about parsing data from json. I worked with easy apis which has not arrays or maps in it. But this data complicated and i guess that's why im getting always null results while try to print datas to screen.
Here is my code
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'dart:convert';
import 'package:video_games/load_data.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
Future<Welcome> apiCall() async {
final response = await http.get(Uri.parse(
'https://api.rawg.io/api/games?key=5ac29048d12d45d0949c77038115cb56'));
print(response.statusCode);
print(response.body);
return Welcome.fromJson(jsonDecode(response.body));
}
#override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: FutureBuilder<Welcome>(
future: apiCall(),
builder: (context, snapshot) {
// var growableList = [];
// List<Result> data = snapshot.data!.results;
// growableList.add(data[0].name);
return Text('${snapshot.data!.count}');
},
),
),
);
}
}
That is my response body and status code without using in a widget or parsing it
I/flutter ( 3666): 200
I/flutter ( 3666): {"count":679153,"next":"https://api.rawg.io/api/games?key=5ac29048d12d45d0949c77038115cb56&page=2","previous":null,"results":[{"id":3498,"slug":"grand-theft-auto-v","name":"Grand Theft Auto V","released":"2013-09-17","tba":false,"background_image":"https://media.rawg.io/media/games/456/456dea5e1c7e3cd07060c14e96612001.jpg","rating":4.48,"rating_top":5,"ratings":[{"id":5,"title":"exceptional","count":3217,"percent":58.97},{"id":4,"title":"recommended","count":1800,"percent":33.0},{"id":3,"title":"meh","count":348,"percent":6.38},{"id":1,"title":"skip","count":90,"percent":1.65}],"ratings_count":5389,"reviews_text_count":36,"added":16689,"added_by_status":{"yet":415,"owned":9874,"beaten":4491,"toplay":474,"dropped":835,"playing":600},"metacritic":97,"playtime":71,"suggestions_count":402,"updated":"2021-08-20T12:42:02","user_game":null,"reviews_count":5455,"saturated_color":"0f0f0f","dominant_color":"0f0f0f","platforms":[{"platform":{"id":1,"name":"Xbox One","slug":"xbox-one","image":null,"year_end":null,"year_
And this is my data class
// To parse this JSON data, do
//
// final welcome = welcomeFromJson(jsonString);
import 'dart:convert';
Welcome welcomeFromJson(String str) => Welcome.fromJson(json.decode(str));
String welcomeToJson(Welcome data) => json.encode(data.toJson());
class Welcome {
Welcome({
required this.count,
required this.next,
required this.previous,
required this.results,
});
int count;
String next;
String previous;
List<Result> results;
factory Welcome.fromJson(Map<String, dynamic> json) => Welcome(
count: json["count"],
next: json["next"],
previous: json["previous"],
results:
List<Result>.from(json["results"].map((x) => Result.fromJson(x))),
);
Map<String, dynamic> toJson() => {
"count": count,
"next": next,
"previous": previous,
"results": List<dynamic>.from(results.map((x) => x.toJson())),
};
}
class Result {
Result({
required this.id,
required this.slug,
required this.name,
required this.released,
required this.tba,
required this.backgroundImage,
required this.rating,
required this.ratingTop,
required this.ratings,
required this.ratingsCount,
required this.reviewsTextCount,
required this.added,
required this.addedByStatus,
required this.metacritic,
required this.playtime,
required this.suggestionsCount,
required this.updated,
required this.esrbRating,
required this.platforms,
});
int id;
String slug;
String name;
DateTime released;
bool tba;
String backgroundImage;
int rating;
int ratingTop;
AddedByStatus ratings;
int ratingsCount;
String reviewsTextCount;
int added;
AddedByStatus addedByStatus;
int metacritic;
int playtime;
int suggestionsCount;
DateTime updated;
EsrbRating esrbRating;
List<Platform> platforms;
factory Result.fromJson(Map<String, dynamic> json) => Result(
id: json["id"],
slug: json["slug"],
name: json["name"],
released: DateTime.parse(json["released"]),
tba: json["tba"],
backgroundImage: json["background_image"],
rating: json["rating"],
ratingTop: json["rating_top"],
ratings: AddedByStatus.fromJson(json["ratings"]),
ratingsCount: json["ratings_count"],
reviewsTextCount: json["reviews_text_count"],
added: json["added"],
addedByStatus: AddedByStatus.fromJson(json["added_by_status"]),
metacritic: json["metacritic"],
playtime: json["playtime"],
suggestionsCount: json["suggestions_count"],
updated: DateTime.parse(json["updated"]),
esrbRating: EsrbRating.fromJson(json["esrb_rating"]),
platforms: List<Platform>.from(
json["platforms"].map((x) => Platform.fromJson(x))),
);
Map<String, dynamic> toJson() => {
"id": id,
"slug": slug,
"name": name,
"released":
"${released.year.toString().padLeft(4, '0')}-${released.month.toString().padLeft(2, '0')}-${released.day.toString().padLeft(2, '0')}",
"tba": tba,
"background_image": backgroundImage,
"rating": rating,
"rating_top": ratingTop,
"ratings": ratings.toJson(),
"ratings_count": ratingsCount,
"reviews_text_count": reviewsTextCount,
"added": added,
"added_by_status": addedByStatus.toJson(),
"metacritic": metacritic,
"playtime": playtime,
"suggestions_count": suggestionsCount,
"updated": updated.toIso8601String(),
"esrb_rating": esrbRating.toJson(),
"platforms": List<dynamic>.from(platforms.map((x) => x.toJson())),
};
}
class AddedByStatus {
AddedByStatus();
factory AddedByStatus.fromJson(Map<String, dynamic> json) => AddedByStatus();
Map<String, dynamic> toJson() => {};
}
class EsrbRating {
EsrbRating({
required this.id,
required this.slug,
required this.name,
});
int id;
String slug;
String name;
factory EsrbRating.fromJson(Map<String, dynamic> json) => EsrbRating(
id: json["id"],
slug: json["slug"],
name: json["name"],
);
Map<String, dynamic> toJson() => {
"id": id,
"slug": slug,
"name": name,
};
}
class Platform {
Platform({
required this.platform,
required this.releasedAt,
required this.requirements,
});
EsrbRating platform;
String releasedAt;
Requirements requirements;
factory Platform.fromJson(Map<String, dynamic> json) => Platform(
platform: EsrbRating.fromJson(json["platform"]),
releasedAt: json["released_at"],
requirements: Requirements.fromJson(json["requirements"]),
);
Map<String, dynamic> toJson() => {
"platform": platform.toJson(),
"released_at": releasedAt,
"requirements": requirements.toJson(),
};
}
class Requirements {
Requirements({
required this.minimum,
required this.recommended,
});
String minimum;
String recommended;
factory Requirements.fromJson(Map<String, dynamic> json) => Requirements(
minimum: json["minimum"],
recommended: json["recommended"],
);
Map<String, dynamic> toJson() => {
"minimum": minimum,
"recommended": recommended,
};
}
Things i tried;
tried to convert response body to string before parsing
tried to change my widget to asnyc
tried to simplify my data class (to avoid arrays)
My opinion after research,
return Welcome.fromJson(jsonDecode(response.body));
this part can't work correctly cause of json decode can't decode complex datas which is has arrays and maps.
I stuck at this point and struggling. There is no document that i can do it correctly. Please help me about this.
I am calling an XML format API and converting it to Json to use it within a Flutter mobile app
I am using xml2Json and it is converting fine
As seen below I call print(jsonMap); and it displays the correct Json data in GData format
I then take my Json parse model, built with Quicktype.io off of the Json model and call locations = Locations.fromJson(jsonMap); as seen below to allow to to draw the required data out. I am currently then just calling print(locations); to check whether its working and the data is returning before implementing the parsed data into the app fully.
I have tried shuffling round everything, I've adapted the Model several times and tried all kinds of methods to parse the data.
I am calling other APIs with the exact same method successfully and the code method is identical in this one. The only difference is the xml2Json convert, which is converting fine (JsonMap printing converted XML correctly), so I'm struggling the see what should be different.
Thanks for reading
The call
Future<Locations> fetchLiveLocations() async {
var client = http.Client();
var locations;
Xml2Json xml2Json = new Xml2Json();
try{
var response = await client.get('API_CALL');
if (response.statusCode == 200) {
xml2Json.parse(response.body);
var jsonString = xml2Json.toGData();
var jsonMap = json.decode(jsonString);
print(jsonMap);
locations = Locations.fromJson(jsonMap);
print(locations);
}
} catch(Exception) {
return locations;
}
return locations;
}
Model
import 'dart:convert';
Locations locationsFromJson(String str) => Locations.fromJson(json.decode(str));
String locationsToJson(Locations data) => json.encode(data.toJson());
class Locations {
Locations({
this.vehicleActivity,
});
List<VehicleActivity> vehicleActivity;
factory Locations.fromJson(Map<String, dynamic> json) => Locations(
vehicleActivity: List<VehicleActivity>.from(json["VehicleActivity"].map((x) => VehicleActivity.fromJson(x))),
);
Map<String, dynamic> toJson() => {
"VehicleActivity": List<dynamic>.from(vehicleActivity.map((x) => x.toJson())),
};
}
class VehicleActivity {
VehicleActivity({
this.recordedAtTime,
this.itemIdentifier,
this.validUntilTime,
this.monitoredVehicleJourney,
this.extensions,
});
DateTime recordedAtTime;
String itemIdentifier;
DateTime validUntilTime;
MonitoredVehicleJourney monitoredVehicleJourney;
Extensions extensions;
factory VehicleActivity.fromJson(Map<String, dynamic> json) => VehicleActivity(
recordedAtTime: DateTime.parse(json["RecordedAtTime"]),
itemIdentifier: json["ItemIdentifier"],
validUntilTime: DateTime.parse(json["ValidUntilTime"]),
monitoredVehicleJourney: MonitoredVehicleJourney.fromJson(json["MonitoredVehicleJourney"]),
extensions: Extensions.fromJson(json["Extensions"]),
);
Map<String, dynamic> toJson() => {
"RecordedAtTime": recordedAtTime.toIso8601String(),
"ItemIdentifier": itemIdentifier,
"ValidUntilTime": validUntilTime.toIso8601String(),
"MonitoredVehicleJourney": monitoredVehicleJourney.toJson(),
"Extensions": extensions.toJson(),
};
}
class Extensions {
Extensions({
this.vehicleJourney,
});
VehicleJourney vehicleJourney;
factory Extensions.fromJson(Map<String, dynamic> json) => Extensions(
vehicleJourney: VehicleJourney.fromJson(json["VehicleJourney"]),
);
Map<String, dynamic> toJson() => {
"VehicleJourney": vehicleJourney.toJson(),
};
}
class VehicleJourney {
VehicleJourney({
this.operational,
this.vehicleUniqueId,
this.driverRef,
});
Operational operational;
int vehicleUniqueId;
int driverRef;
factory VehicleJourney.fromJson(Map<String, dynamic> json) => VehicleJourney(
operational: Operational.fromJson(json["Operational"]),
vehicleUniqueId: json["VehicleUniqueId"],
driverRef: json["DriverRef"],
);
Map<String, dynamic> toJson() => {
"Operational": operational.toJson(),
"VehicleUniqueId": vehicleUniqueId,
"DriverRef": driverRef,
};
}
class Operational {
Operational({
this.ticketMachine,
});
TicketMachine ticketMachine;
factory Operational.fromJson(Map<String, dynamic> json) => Operational(
ticketMachine: TicketMachine.fromJson(json["TicketMachine"]),
);
Map<String, dynamic> toJson() => {
"TicketMachine": ticketMachine.toJson(),
};
}
class TicketMachine {
TicketMachine({
this.ticketMachineServiceCode,
this.journeyCode,
});
dynamic ticketMachineServiceCode;
int journeyCode;
factory TicketMachine.fromJson(Map<String, dynamic> json) => TicketMachine(
ticketMachineServiceCode: json["TicketMachineServiceCode"],
journeyCode: json["JourneyCode"],
);
Map<String, dynamic> toJson() => {
"TicketMachineServiceCode": ticketMachineServiceCode,
"JourneyCode": journeyCode,
};
}
class MonitoredVehicleJourney {
MonitoredVehicleJourney({
this.lineRef,
this.directionRef,
this.publishedLineName,
this.operatorRef,
this.destinationRef,
this.vehicleLocation,
this.blockRef,
this.vehicleJourneyRef,
this.vehicleRef,
});
int lineRef;
String directionRef;
int publishedLineName;
String operatorRef;
int destinationRef;
VehicleLocation vehicleLocation;
int blockRef;
String vehicleJourneyRef;
int vehicleRef;
factory MonitoredVehicleJourney.fromJson(Map<String, dynamic> json) => MonitoredVehicleJourney(
lineRef: json["LineRef"],
directionRef: json["DirectionRef"],
publishedLineName: json["PublishedLineName"],
operatorRef: json["OperatorRef"],
destinationRef: json["DestinationRef"],
vehicleLocation: VehicleLocation.fromJson(json["VehicleLocation"]),
blockRef: json["BlockRef"],
vehicleJourneyRef: json["VehicleJourneyRef"],
vehicleRef: json["VehicleRef"],
);
Map<String, dynamic> toJson() => {
"LineRef": lineRef,
"DirectionRef": directionRef,
"PublishedLineName": publishedLineName,
"OperatorRef": operatorRef,
"DestinationRef": destinationRef,
"VehicleLocation": vehicleLocation.toJson(),
"BlockRef": blockRef,
"VehicleJourneyRef": vehicleJourneyRef,
"VehicleRef": vehicleRef,
};
}
class VehicleLocation {
VehicleLocation({
this.longitude,
this.latitude,
});
double longitude;
double latitude;
factory VehicleLocation.fromJson(Map<String, dynamic> json) => VehicleLocation(
longitude: json["Longitude"].toDouble(),
latitude: json["Latitude"].toDouble(),
);
Map<String, dynamic> toJson() => {
"Longitude": longitude,
"Latitude": latitude,
};
}
Response when I request specific data from the model
NoSuchMethodError (NoSuchMethodError: The getter 'vehicleActivity' was called on null.
Receiver: null
I'm currently studying flutter and I'm creating an app on my own...
So the problem at the moment is that I need to fetch json data and to put it in the list, in this case listOfCards (custom made object Card contains initialSearch as String and results as List. I've been following this example https://flutter.dev/docs/cookbook/networking/background-parsing#convert-the-response-into-a-list-of-photos but there they are directly parsing data into app and I really didn't know how to use it in my case.
I need to fill this listOfCards List to use it later in the app.
So here's the code:
import 'package:http/http.dart' as http;
import 'dart:async';
import 'dart:convert';
List<Card> listOfCards = [];
Future<List<Card>> fetchCards(http.Client client) async {
final response = await client.get(
Uri.parse('605a2f18b11aba001745dbdd.mockapi.io/api/v1/cards'),
);
return parseCards(response.body);
}
List<Card> parseCards(String responseBody) {
final parsed = jsonDecode(responseBody).cast<Map<String, dynamic>>();
return parsed.map<Card>((json) => Card.fromJson(json)).toList();
}
class Card {
String initialSearch;
List<String> mostPopularSearches;
Card({
this.initialSearch,
this.mostPopularSearches,
});
factory Card.fromJson(Map<String, dynamic> json) {
return Card(
initialSearch: json['search'] as String,
mostPopularSearches: json['results'] as List,
);
}
}
Custome class
class Card {
String initialSearch;
List<String> mostPopularSearches;
Card({this.initialSearch, this.mostPopularSearches});
Card.fromJson(Map<String, dynamic> json) {
initialSearch = json['initialSearch'];
mostPopularSearches = json['mostPopularSearches'].cast<String>();
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['initialSearch'] = this.initialSearch;
data['mostPopularSearches'] = this.mostPopularSearches;
return data;
}
}
Generated using Json to dart
To store the responses as Card object
Card _card = Card.fromJson(responsebody);
Your response JSON
{
"initialSearch": "Google",
"mostPopularSearches": [
"Google",
"Facebook",
"Stacjoverflow",
"Reddit"
]
}
I am trying to work with firebase database from flutter. I have made a model class which I am converting to json and from json via plugin json_serializable. Where model class works perfectly fine with hard coded json data but when I am trying to save the encoded data to firebase database it's getting saved as a string instead of key value pair in firebase database.Below is my code to convert it and save it
List<Action> actions = [];
actions.add(new Action('This is label', 'mranuran.com'));
EgluCard egluCard = new EgluCard(true, true, "HI", "World", "Awesome",CardType.TYPE_1 , ["images"], 123, 125, "#FFFFFF", PlatformType.IOS, actions);
//print(json.encode(egluCard));
// var jsonString = '{"isInternal":true,"isPublished":true,"title":"HI","body":"World","caption":"Awesome","cardType":"TYPE_1","images":["images"],"expiry":123,"showAt":125,"bgColor":"#FFFFFF","platformType":"IOS","actions":[{"label":"This is label","url":"mranuran.com"}]}';
// Map<String,dynamic> cardMap = json.decode(jsonString);
// EgluCard egluCard = EgluCard.fromJson(cardMap);
// print(egluCard.actions[0].label);
var jsonString = json.encode(egluCard);
var trimmedString = jsonString.substring(0,jsonString.length);
print(trimmedString);
cardsDBRef.push().set(jsonString)
.then((_){
print('saved!!');
});
when I am printing the json.encode(eGluCard) then it's printing a valid json but when it's getting saved into firebase I am getting the following from firebase. It was supposed to save as key value pair but it was saved as a whole string.
"{\"isInternal\":true,\"isPublished\":true,\"title\":\"HI\",\"body\":\"World\",\"caption\":\"Awesome\",\"cardType\":\"TYPE_1\",\"images\":[\"images\"],\"expiry\":123,\"showAt\":125,\"bgColor\":\"#FFFFFF\",\"platformType\":\"IOS\",\"actions\":[{\"label\":\"This is label\",\"url\":\"mranuran.com\"}]}"
what can be wrong in this approach? below are my model classed and their generated serializer respectively
EgluCard.dart
import 'card_type.dart';
import 'platform_type.dart';
import 'action.dart';
import 'package:json_annotation/json_annotation.dart';
part 'eglu_card.g.dart';
#JsonSerializable()
class EgluCard {
bool isInternal;
bool isPublished;
String title;
String body;
String caption;
CardType cardType;
List<String> images;
int expiry;
int showAt;
String bgColor;
PlatformType platformType;
List<Action> actions;
EgluCard(this.isInternal,this.isPublished,this.title,this.body,this.caption,this.cardType,this.images,
this.expiry,this.showAt,this.bgColor,this.platformType,this.actions);
factory EgluCard.fromJson(Map<String, dynamic> json) => _$EgluCardFromJson(json);
Map<String, dynamic> toJson() => _$EgluCardToJson(this);
}
EgluCard Serializer
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'eglu_card.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
EgluCard _$EgluCardFromJson(Map<String, dynamic> json) {
return EgluCard(
json['isInternal'] as bool,
json['isPublished'] as bool,
json['title'] as String,
json['body'] as String,
json['caption'] as String,
_$enumDecodeNullable(_$CardTypeEnumMap, json['cardType']),
(json['images'] as List)?.map((e) => e as String)?.toList(),
json['expiry'] as int,
json['showAt'] as int,
json['bgColor'] as String,
_$enumDecodeNullable(_$PlatformTypeEnumMap, json['platformType']),
(json['actions'] as List)
?.map((e) =>
e == null ? null : Action.fromJson(e as Map<String, dynamic>))
?.toList());
}
Map<String, dynamic> _$EgluCardToJson(EgluCard instance) => <String, dynamic>{
'isInternal': instance.isInternal,
'isPublished': instance.isPublished,
'title': instance.title,
'body': instance.body,
'caption': instance.caption,
'cardType': _$CardTypeEnumMap[instance.cardType],
'images': instance.images,
'expiry': instance.expiry,
'showAt': instance.showAt,
'bgColor': instance.bgColor,
'platformType': _$PlatformTypeEnumMap[instance.platformType],
'actions': instance.actions
};
T _$enumDecode<T>(Map<T, dynamic> enumValues, dynamic source) {
if (source == null) {
throw ArgumentError('A value must be provided. Supported values: '
'${enumValues.values.join(', ')}');
}
return enumValues.entries
.singleWhere((e) => e.value == source,
orElse: () => throw ArgumentError(
'`$source` is not one of the supported values: '
'${enumValues.values.join(', ')}'))
.key;
}
T _$enumDecodeNullable<T>(Map<T, dynamic> enumValues, dynamic source) {
if (source == null) {
return null;
}
return _$enumDecode<T>(enumValues, source);
}
const _$CardTypeEnumMap = <CardType, dynamic>{CardType.TYPE_1: 'TYPE_1'};
const _$PlatformTypeEnumMap = <PlatformType, dynamic>{
PlatformType.ANDROID: 'ANDROID',
PlatformType.IOS: 'IOS',
PlatformType.ANDROID_THING: 'ANDROID_THING',
PlatformType.ANY: 'ANY'
};
Action.dart
import 'package:json_annotation/json_annotation.dart';
part 'action.g.dart';
#JsonSerializable()
class Action {
String label;
String url;
Action(this.label,this.url);
factory Action.fromJson(Map<String, dynamic> json) => _$ActionFromJson(json);
Map<String, dynamic> toJson() => _$ActionToJson(this);
}
Action Serializer
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'action.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
Action _$ActionFromJson(Map<String, dynamic> json) {
return Action(json['label'] as String, json['url'] as String);
}
Map<String, dynamic> _$ActionToJson(Action instance) =>
<String, dynamic>{'label': instance.label, 'url': instance.url};
PlatformType and CardType are enums
Okay turns out I have to decode and encoded string before passing it to firebase.
So code to save the model class to firebase will be like this:
List<Action> actions = [];
actions.add(new Action('This is label', 'mranuran.com'));
EgluCard egluCard = new EgluCard(true, true, "HI", "World", "Awesome",CardType.TYPE_1 , ["images"], 123, 125, "#FFFFFF", PlatformType.IOS, actions);
var jsonString = json.encode(egluCard);
print(json.decode(jsonString));
cardsDBRef.push().set(json.decode(jsonString))
.then((_){
print('saved!!');
});