add Int64Component
This commit is contained in:
@@ -2,7 +2,6 @@ package block
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type Block struct {
|
||||
@@ -23,17 +22,18 @@ func (b *BlockInstance) FromJSON(block *Block, data []byte) error {
|
||||
|
||||
for _, c := range block.Components {
|
||||
jsonValue, ok := raw[c.Identifier()]
|
||||
// jsonValue, ok := raw[c.Identifier()]
|
||||
if !ok {
|
||||
continue
|
||||
// continue
|
||||
jsonValue = nil
|
||||
}
|
||||
instance := c.NewInstance()
|
||||
|
||||
if err := instance.FromJSON(c, jsonValue); err != nil {
|
||||
return err
|
||||
}
|
||||
components = append(components, instance)
|
||||
|
||||
fmt.Println(c.Identifier(), instance)
|
||||
components = append(components, instance)
|
||||
}
|
||||
|
||||
b.Components = components
|
||||
|
||||
Reference in New Issue
Block a user