HSLYaml library?

Hi
Is there a HSLYaml library for Venus? Something like the HSLJson library but for YAML instead?

Thanks in advance.

Hi Gareth,

To my knowledge, HSLJSON and HSLXML are the closest options. I am unaware of any implementations specific to YAML files. I will let you know if I hear otherwise.

-Nick

1 Like

Thanks Nick. I wondered if that would be the case. Might look into making my own…

1 Like

That would be awesome. Wish we could “crowdfund” these small endeavors.

2 Likes

Instead of doing this the hard way in HSL why not write a short python script that converts the yaml to JSON and then push it into VENUS. Let me know if I should give you an example of how to solve this, I think this should be a straightforward 10-liner at max. Actually a perfect example where HSL would be total overkill.

1 Like

Thanks for your advice, but I disagree, installing python (especially as we would be installing this on regulated machines too) for this would be overkill. Yeah, the python script would be simple, but then I don’t think HSL would be too bad either, considering it could probably be a wrapper around a .dll like HSLJson is. There’s lots of ways the same goal came be achieved, but having a first party library would be preferable (again, especially in GxP world).

1 Like

Hey Gareth, and anyone else interested, @smohler perhaps?

How would you envision using Yaml in the context of Venus?

I’m definitely coming into this late :sloth: but I took a crack at bringing YAML into Venus with with functions for Loading, Saving, and serializing/deserializing YAML + JSON with YamlDotNet.

HSLYaml Venus Library Functions

YAML Input:

---
title: "test yaml document property"
volume: "1000"
wtf: "123333"
baseball players:
  - "Willie Mays"
  - "Jackie Robinson"
  - "Ty Cobb"
basketball players:
  - "Larry Bird"
  - "Michael Jordan"
  - "Jesus Shuttlesworth"
plates:
  - barcode: 12345
    wells:
      - A1
      - A2
      - A3
      - A4
    volume: 10.01
  - barcode: 23456
    wells:
      - A1
      - A2
      - A3
      - A4
    volume:  10.01

JSON output:

{
  "title": "test yaml document property",
  "volume": 1000,
  "wtf": 123333,
  "baseball players": [
    "Willie Mays",
    "Jackie Robinson",
    "Ty Cobb"
  ],
  "basketball players": [
    "Larry Bird",
    "Michael Jordan",
    "Jesus Shuttlesworth"
  ],
  "plates": [
    {
      "barcode": 12345,
      "wells": [
        "A1",
        "A2",
        "A3",
        "A4"
      ],
      "volume": 10.01
    },
    {
      "barcode": 23456,
      "wells": [
        "A1",
        "A2",
        "A3",
        "A4"
      ],
      "volume": 10.01
    }
  ]
}
6 Likes

That’s awesome. I tried doing the same - would you be able to share the library? I’d love to see what we did differently as mine never worked, although I think it was a problem of compiling to a .NET framework version compatible with Venus…

I’m thinking of it as potentially useful for configuration, especially by those who we trust enough to edit yaml files but not HSL files :wink:

1 Like