Code Monkey home page Code Monkey logo

bloc-serialization's Introduction

License Pharo 11 CI Pharo 12 CI

Bloc-Serialization

Bloc serialization features to store/unstore BlElements.

Getting Started

Installation

To install Bloc-Serialization on your Pharo image you can just execute the following script:

Metacello new
	baseline: 'BlocSerialization';
	repository: 'github://OpenSmock/Bloc-Serialization:main/src';
	load.

How to use

Serialization

Use this method to serialize any BlElement into a String.

blElement := BlElement new.

string := blElement serialize.

Use same method to serialize a list of BlElement into a String.

oc := OrderedCollection new.
oc add: BlElement new.
oc add: BlElement new.
oc add: BlElement new.

string := oc serialize.

Materialization (Deserialization)

Use this method to materialize any serialized String into a BlElement. Of course, you need to know that the string is a serialized BlElement.

blElement := string materializeAsBlElement.

Use this method to materialize any serialized String into a BlElement collection. Of course, you need to know that the string is a serialized Collection.

oc := string materializeAsBlElement.

Tips : you can quickly copy a BlElement using BlElement>>serializeThenMaterialize.

element := BlElement new.
copy := element serializeThenMaterialize.

Exception / Error

Serialization or Materialization process return some exceptions in case of problems :

  • BlocSerializerError

BlocSerializationError BlocMaterializationError

Serialization backends

Actually STON is the only backend used for serialization. The project architecture allow to add anothers serialization backends if needed.

Dependencies

License

This project is licensed under the MIT License - see the LICENSE file for details.

bloc-serialization's People

Contributors

labordep avatar nyan11 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

nyan11

bloc-serialization's Issues

Warning: Package *Bloc-Serialization-STON depends on the following classes: BlElementCurrentProperties and BlElementStates

Warning when loading the project:

Warning: Package *Bloc-Serialization-STON depends on the following classes:
BlElementCurrentProperties
BlElementStates
You must resolve these dependencies before you will be able to load these definitions:
BlElementCurrentProperties>>#stonProcessSubObjects:
BlElementStates>>#stonProcessSubObjects:

When click on proceed, the project continue to load, at the end there are two missing classes:

  • BlElementCurrentProperties
  • BlElementStates

image

How to manage the evolution of the Bloc API?

The Bloc API is undergoing development.
How can we effectively manage long-term changes (e.g., Bloc v1, v2, etc.) to ensure compatibility with previously saved views?
This challenge also extends to the upcoming Toplo serialization project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.