package Glib::JSON;
$Glib::JSON::VERSION = '0.002';
use strict;
use warnings;
use Carp qw/croak/;
use Exporter;
use Glib;
use Glib::IO;
use Glib::Object::Introspection 0.016;

our @ISA = qw(Exporter);

my $_JSON_GLIB_VERSION = '1.0';

sub import {
  my $class = shift;

  Glib::Object::Introspection->setup (
    basename => $_JSON_GLIB_BASENAME,
    version => $_JSON_GLIB_VERSION,
    package => $_JSON_GLIB_PACKAGE,



=head1 NAME

Glib::JSON - Perl interface to the JSON-GLib library


  use Glib::JSON;

  # build a JSON structure
  my $builder = Glib::JSON::Builder->new();

  # {
  #   "url" : ""
  #   "size" : [ 652, 242 ]
  # }




  # generate the JSON string
  my $generator = Glib::JSON::Generator->new();
  my $data = $generator->to_data();

  # load the string into a JSON document
  my $parser = Glib::JSON::Parser->new();

  # parse the document
  my $reader = Glib::JSON::Reader->new();

  my $url = $reader->get_string_value();

  my $width = $reader->get_int_value();
  my $height = $reader->get_int_value();


Glib::JSON is a Perl module that provides access to the JSON-GLib library
through introspection.

Glib::JSON allows parsing and generating JSON documents through a simple,
DOM-like API; it also provides cursor-based API to parse and generate JSON

Glib::JSON is integrated with the GLib and GObject data types, and can
easily serialize and deserialize JSON data from and to GObject instances.

=head1 SEE ALSO


=item L<Glib>

=item L<Glib::Object::Introspection>


=head1 AUTHORS

=encoding utf8


=item Emmanuele Bassi <>



Copyright (C) 2014  Emmanuele Bassi

This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Library General Public License as published by the Free
Software Foundation; either version 2.1 of the License, or (at your option) any
later version.