Skip to content
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

Serialiser_Engine: Deserialisation of nested lists #3160

Merged
merged 2 commits into from
Aug 30, 2023

Conversation

FraserGreenroyd
Copy link
Contributor

@FraserGreenroyd FraserGreenroyd commented Aug 29, 2023

Fixes #2674

Test Files

Available here. The JSON used has come from @tg359 on the linked issue which this PR aims to resolve.

On alpha:

image

On this PR:

image

If testing using the provided test script please make sure you redrag the output of FromJson into the Explode component to get it to update. Alternatively, drop a new Explode component on the canvas and compare the cached one with the one from this PR.

E.G:

image

@FraserGreenroyd FraserGreenroyd added type:bug Error or unexpected behaviour status:WIP PR in progress and still in draft, not ready for formal review labels Aug 29, 2023
@FraserGreenroyd FraserGreenroyd self-assigned this Aug 29, 2023
Copy link
Member

@adecler adecler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this makes sense.
I would have loved to be able to extract the type of object that are inside the list but this is is a bit trickier when dealing with json so happy with the current solution for now.

Just a minor tweak inside the DeserialiseNestedList method and then I think we are good to go.

Serialiser_Engine/Compute/Deserialise/List.cs Outdated Show resolved Hide resolved
Serialiser_Engine/Compute/Deserialise/List.cs Outdated Show resolved Hide resolved
Copy link
Member

@adecler adecler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy with the corrections following comments.
All works well now and code makes sense,

@FraserGreenroyd
Copy link
Contributor Author

@BHoMBot check compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Aug 30, 2023

@FraserGreenroyd to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance

@FraserGreenroyd
Copy link
Contributor Author

@BHoMBot check required

@bhombot-ci
Copy link

bhombot-ci bot commented Aug 30, 2023

@FraserGreenroyd to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check core
  • check null-handling
  • check serialisation
  • check versioning
  • check installer

@bhombot-ci
Copy link

bhombot-ci bot commented Aug 30, 2023

The check code-compliance has already been run previously and recorded as a successful check. This check has not been run again at this time.

@bhombot-ci
Copy link

bhombot-ci bot commented Aug 30, 2023

The check documentation-compliance has already been run previously and recorded as a successful check. This check has not been run again at this time.

@FraserGreenroyd
Copy link
Contributor Author

@BHoMBot check ready-to-merge

@bhombot-ci
Copy link

bhombot-ci bot commented Aug 30, 2023

@FraserGreenroyd to confirm, the following actions are now queued:

  • check ready-to-merge

@FraserGreenroyd
Copy link
Contributor Author

@BHoMBot this is a DevOps instruction. I am requesting neutral checks on: unit-tests

@bhombot-ci
Copy link

bhombot-ci bot commented Aug 30, 2023

@FraserGreenroyd I have provided neutral checks to the checks requested. These checks will need to be run properly to obtain full results.

@FraserGreenroyd FraserGreenroyd merged commit 6429a21 into develop Aug 30, 2023
@FraserGreenroyd FraserGreenroyd deleted the BHoM_Engine-#2674-ExplodeCustomObject branch August 30, 2023 10:56
@bhombot-ci bhombot-ci bot mentioned this pull request Sep 11, 2023
@bhombot-ci bhombot-ci bot mentioned this pull request Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:WIP PR in progress and still in draft, not ready for formal review type:bug Error or unexpected behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BHoM_Engine: Elegantly handle nested lists within JSONs
2 participants