-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More return type for Get Value From JSON #36
Comments
It is a bit complex to return an object as the data must be formatted for JSON. I would assume you would like to instantiate an object from the data but the reverse should be applied as well (serialize the object) so you can dump in a JSON file? as #35 is merged, you can now create a new branch from the master to implement your idea. |
I don't think we can have object in robot framework like in C# or Java, so of do we instantiate a object without class ? |
You need to create some code in python that could be called by Robot after: in somescript.py
in test.robot
|
you can call python code with Evaluate:
or use method on object
|
Ok, just I have no experience in python, I will need to learn |
@pencherek If You could describe more precisely Your case I could try to implement that. For now, the keyword "Get Value From Json" returns a list of found values filtered by expression in a given JSON object:
I think this library doesn't need to operate on custom objects as here we're only playing with the strings, lists, or dictionaries, where at the very end all the values are primitive ones (str, int, bool). |
I have the idea to add more return type to the keyword Get Value From JSON.
Because what it return is not a JSON, this optonial parameter would let you choose if the keyword must return a json object, a string ?, a array, ...
The text was updated successfully, but these errors were encountered: