{
    "content": [
        {
            "type": "text",
            "text": "# BSON::Decimal128 (perldoc)\n\n## NAME\n\nBSON::Decimal128 - BSON type wrapper for Decimal128\n\n## SYNOPSIS\n\nuse BSON::Types ':all';\n# string representation\n$decimal = bsondecimal128( \"1.23456789E+1000\" );\n# binary representation in BID format\n$decimal = BSON::Decimal128->new( bytes => $bid )\n\n## DESCRIPTION\n\nThis module provides a BSON type wrapper for Decimal128 values.\n\n## Sections\n\n- **NAME**\n- **VERSION**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **ATTRIBUTES**\n- **METHODS**\n- **OVERLOADING**\n- **AUTHORS**\n- **COPYRIGHT AND LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "BSON::Decimal128",
        "section": "",
        "mode": "perldoc",
        "summary": "BSON::Decimal128 - BSON type wrapper for Decimal128",
        "synopsis": "use BSON::Types ':all';\n# string representation\n$decimal = bsondecimal128( \"1.23456789E+1000\" );\n# binary representation in BID format\n$decimal = BSON::Decimal128->new( bytes => $bid )",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "ATTRIBUTES",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "OVERLOADING",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENSE",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "BSON::Decimal128 - BSON type wrapper for Decimal128\n",
                "subsections": []
            },
            "VERSION": {
                "content": "version v1.12.2\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use BSON::Types ':all';\n\n# string representation\n$decimal = bsondecimal128( \"1.23456789E+1000\" );\n\n# binary representation in BID format\n$decimal = BSON::Decimal128->new( bytes => $bid )\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This module provides a BSON type wrapper for Decimal128 values.\n\nIt may be initialized with either a numeric value in string form, or with a binary Decimal128\nrepresentation (16 bytes), but not both.\n\nInitialization from a string will throw an error if the string cannot be parsed as a Decimal128\nor if the resulting number would not fit into 128 bits. If required, clamping or exact rounding\nwill be applied to try to fit the value into 128 bits.\n",
                "subsections": []
            },
            "ATTRIBUTES": {
                "content": "value\nThe Decimal128 value represented as string. If not provided, it will be generated from the\n\"bytes\" attribute on demand.\n\nbytes\nThe Decimal128 value represented in Binary Integer Decimal\n<https://en.wikipedia.org/wiki/BinaryIntegerDecimal> (BID) format. If not provided, it will be\ngenerated from the \"value\" attribute on demand.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "TOJSON\nReturns the value as a string.\n\nIf the \"BSONEXTJSON\" option is true, it will instead be compatible with MongoDB's extended JSON\n<https://github.com/mongodb/specifications/blob/master/source/extended-json.rst> format, which\nrepresents it as a document as follows:\n\n{\"$numberDecimal\" : \"2.23372036854775807E+57\"}\n",
                "subsections": []
            },
            "OVERLOADING": {
                "content": "The stringification operator (\"\") is overloaded to return a (normalized) string representation.\nFallback overloading is enabled.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "*   David Golden <david@mongodb.com>\n\n*   Stefan G. <minimalist@lavabit.com>\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENSE": {
                "content": "This software is Copyright (c) 2020 by Stefan G. and MongoDB, Inc.\n\nThis is free software, licensed under:\n\nThe Apache License, Version 2.0, January 2004\n",
                "subsections": []
            }
        }
    }
}