MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / marshalPythonJSON

Function marshalPythonJSON

session/store.go:687–698  ·  view source on GitHub ↗
(value any, indent bool)

Source from the content-addressed store, hash-verified

685func orderedReadFileStateSnapshot(entries map[string]file.FileStateEntry) *orderedmap.OrderedMap[string, any] {
686 out := newOrderedJSONMap()
687 keys := make([]string, 0, len(entries))
688 for key := range entries {
689 keys = append(keys, key)
690 }
691 sort.Strings(keys)
692 for _, key := range keys {
693 entry := entries[key]
694 item := newOrderedJSONMap()
695 item.Set("content", entry.Content)
696 item.Set("timestamp", entry.TimeStamp)
697 item.Set("is_partial_view", entry.IsPartialView)
698 item.Set("line_endings", entry.LineEndings)
699 out.Set(key, item)
700 }
701 return out

Callers 2

atomicWriteJSONFunction · 0.85
atomicWriteJSONLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected