---
name: "Catmandu::Fix::marc_in_json"
section: "3pm"
platform: "linux"
package: "libcatmandu-marc-perl"
version: "1.320-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Catmandu::Fix::marc_in_json"
---

# Catmandu::Fix::marc\_in\_json(3pm)

transform a Catmandu MARC record into MARC-in-JSON

## NAME

Catmandu::Fix::marc\_in\_json - transform a Catmandu MARC record into MARC-in-JSON

## SYNOPSIS

```
   # Transform a Catmandu MARC 'record' into a MARC-in-JSON record
   marc_in_json()
   # Reverse, transform a MARC-in-JSON record into a Catmandu MARC record
   marc_in_json(reverse:1)
```

## DESCRIPTION

Convert the MARC record into MARC-in-JSON format

## METHODS

### marc\_in\_json( \[OPT1:VAL, OPT2: VAL\])

Convert a Catmandu MARC record into the MARC-in-JSON format.

## OPTIONS

### reverse: 0\|1

Convert a MARC-in-JSON record back into the Catmandu MARC format.

## INLINE

This Fix can be used inline in a Perl script:

```
    use Catmandu::Fix::marc_in_json as => 'marc_in_json';
    my $data = { record => [...] };
    $data = marc_in_json($data);
```

## SEE ALSO

Catmandu::Fix
