Skip to content

wrapper text following JSON block not recognized #1

@bunnylushington

Description

@bunnylushington

This is a really useful library and has worked well for most of the real world stuff I've thrown at it. Thanks for taking the time to write and distribute it!

I ran into one small issue: text following the JSON block -- when there is not text preceding it -- is not cleaned. Specifically this fails

    """
    [
      {
        "volumeID": "f3a6ffd2-0111-4235-980c-a5ceec215e93",
        "name": "km-tst-20",
        "cloudID": "75b10103873d4a1ba0d52b43159a2842",
        "size": 1,
        "storageType": "ssd",
        "state": "creating",
        "shareable": false,
        "bootable": false,
        "volumePool": "General-Flash-002"
      }
    ]
    1 Volume(s) created
    """

while these both succeed:

    """
    1 Volume(s) created
    [
      {
        "volumeID": "f3a6ffd2-0111-4235-980c-a5ceec215e93",
        "name": "km-tst-20",
        "cloudID": "75b10103873d4a1ba0d52b43159a2842",
        "size": 1,
        "storageType": "ssd",
        "state": "creating",
        "shareable": false,
        "bootable": false,
        "volumePool": "General-Flash-002"
      }
    ]
    1 Volume(s) created
    """
    """
    1 Volume(s) created
    [
      {
        "volumeID": "f3a6ffd2-0111-4235-980c-a5ceec215e93",
        "name": "km-tst-20",
        "cloudID": "75b10103873d4a1ba0d52b43159a2842",
        "size": 1,
        "storageType": "ssd",
        "state": "creating",
        "shareable": false,
        "bootable": false,
        "volumePool": "General-Flash-002"
      }
    ]
    """

Not a hinderance to making use of the library but it is a real world issue and thought it might be a reasonable target for washing. Thanks again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions