1 package CXGN
::BrAPI
::JSONResponse
;
5 use CXGN
::BrAPI
::Pagination
;
11 my $http_code = shift;
12 push @
$status, { 'ERROR' => $message };
13 my $formatted_status = _convert_status_obj
($status);
14 my $pagination = CXGN
::BrAPI
::Pagination
->pagination_response(0,1,0);
16 'status' => $formatted_status,
17 'pagination' => $pagination,
20 'http_code' => $http_code
28 my $pagination = shift;
29 my $data_files = shift;
32 push @
$status, { 'INFO' => $message };
33 my $formatted_status = _convert_status_obj
($status);
35 'status' => $formatted_status,
36 'pagination' => $pagination,
38 'datafiles' => $data_files
43 sub _convert_status_obj
{
47 while (my ($code, $message) = each %$_){
48 push @formatted_status, {
54 return \
@formatted_status;