The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Zing::Encoder::Json - JSON Serialization Abstraction

ABSTRACT

JSON Data Serialization Abstraction

SYNOPSIS

  use Zing::Encoder::Json;

  my $encoder = Zing::Encoder::Json->new;

  # $encoder->encode({ status => 'okay' });

DESCRIPTION

This package provides a JSON data serialization abstraction for use with Zing::Store stores.

LIBRARIES

This package uses type constraints from:

Zing::Types

METHODS

This package implements the following methods:

decode

  decode(Str $data) : HashRef

The decode method decodes the data provided.

decode example #1
  # given: synopsis

  $encoder->decode('{ "status":"okay" }');

encode

  encode(HashRef $data) : Str

The encode method encodes the data provided.

encode example #1
  # given: synopsis

  $encoder->encode({ status => 'okay' });

AUTHOR

Al Newkirk, awncorp@cpan.org

LICENSE

Copyright (C) 2011-2019, Al Newkirk, et al.

This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".

PROJECT

Wiki

Project

Initiatives

Milestones

Contributing

Issues