toJson method

EntryObject toJson({
  1. bool shouldParseValueToJson = false,
})

Converts the entry to an EntryObject.

The shouldParseValueToJson parameter indicates whether the value should be parsed as JSON. Returns an EntryObject containing the entry details.

Implementation

EntryObject toJson({bool shouldParseValueToJson = false}) {
  return EntryObject(
    name: name,
    value: shouldParseValueToJson ? jsonDecode(value) : value,
    tags: tags,
    category: category,
  );
}