{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"bigcodebench","formal_name":"BigCodeBench","introduction":"BigCodeBench poses 1,140 function-level tasks drawn across 139 libraries. It tests whether a model can compose several real APIs correctly rather than write one self-contained function.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://bigcode-bench.github.io/","indexing_mode":"index","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[],"history":"","construction":"","limitations":"","saturation":"","scores":[]}},"task_id":"accc6a2f-47f8-52b8-882c-f16d0da6fe0c","task_key":"default--v0~2e1~2e0~5fhf--accc6a2f-47f8-52b8-882c-f16d0da6fe0c","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf accc6a2f-47f8-52b8-882c-f16d0da6fe0c","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import json\\nfrom datetime import datetime\\nfrom decimal import Decimal\\ndef task_func(my_obj):\\n\",\"complete_prompt\":\"import json\\nfrom datetime import datetime\\nfrom decimal import Decimal\\n\\ndef task_func(my_obj):\\n    \\\"\\\"\\\"\\n    Serializes an object to a JSON string, adding support for datetime and Decimal data types.\\n    \\n    Handle complex data types not natively supported by the json module's default encoder. The `My_class` parameter is reserved for future use and does \\n    not affect the current implementation.\\n    \\n    Parameters:\\n    - my_obj (object): The object to serialize, can include complex types such as datetime and Decimal.\\n    \\n    Returns:\\n    - str: A JSON-formatted string representing `my_obj`, with datetime and Decimal objects properly serialized.\\n        \\n    Requirements:\\n    - json\\n    - datetime.datetime\\n    - decimal.Decimal\\n    \\n    Examples:\\n    Serialize a dictionary containing datetime and Decimal:\\n    >>> result = task_func({'time': datetime(2023, 4, 1, 12, 0), 'amount': Decimal('10.99')})\\n    >>> '2023-04-01T12:00:00' in result and '10.99' in result\\n    True\\n\\n    Serialize a simple dictionary:\\n    >>> task_func({'name': 'Alice', 'age': 30})\\n    '{\\\"name\\\": \\\"Alice\\\", \\\"age\\\": 30}'\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Serializes an object to a JSON string, adding support for datetime and Decimal data types. Handle complex data types not natively supported by the json module's default encoder. The `My_class` parameter is reserved for future use and does not affect the current implementation. Serialize a simple dictionary: >>> task_func({'name': 'Alice', 'age': 30}) '{\\\"name\\\": \\\"Alice\\\", \\\"age\\\": 30}'\\nThe function should output with:\\n    str: A JSON-formatted string representing `my_obj`, with datetime and Decimal objects properly serialized.\\nYou should write self-contained code starting with:\\n```\\nimport json\\nfrom datetime import datetime\\nfrom decimal import Decimal\\ndef task_func(my_obj):\\n```\",\"libs\":\"['decimal', 'datetime', 'json']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}