If you look inside the things:
RubiksCubes`RubiksCube @ <|
"Size" -> 4,
"Origin" -> {0., 0., 0.},
"Colors" -> {
RGBColor[0.4, 0.4, 0.4],
RGBColor[0.291989, 0.437977, 0.888609],
RGBColor[0.800498, 0.201504, 0.192061],
RGBColor[0.578462, 0.85539, 0.408855],
RGBColor[0.658708, 0.492173, 0.842842],
RGBColor[0.8913, 0.631904, 0.627399],
RGBColor[0.546138, 0.844244, 0.892092]
},
"Cuboids" -> {
{
{
RubiksCubes`Private`RubiksCuboid[
<|
"Coordinates" -> {\[Ellipsis] " -> {1, 3, 5, 1, 1, 1},
"Version" -> 1
|>,
RubiksCubes`Private`RubiksCuboid @ <|
"Coordinates" -> {
{1.025, 1.025, 1.025},
{1.025, 1.025, 1.975},
{1.025, 1.975, 1.025},
{1.025, 1.975, 1.975},
{1.975, 1.025, 1.025},
{1.975, 1.025, 1.975},
{1.975, 1.975, 1.025},
{1.975, 1.975, 1.975}
},
"ColorIndices" -> {7, 3, 5, 1, 1, 1},
"Version" -> 1
|>
}
}
},
"Version" -> 1
|>
You see that in fact they're stored as just and Association
of data, basically. Now, of course, Mathematica does treat every expression as an object that you can attach properties to and so if you use SetProperty
on the thing to store its properties you won't actually recover those since I treat them as invisible state.
But in general, yes, these serialize very well.